summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.java5
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java9
2 files changed, 9 insertions, 5 deletions
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.java
index 49309004..4c14f0fd 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Cred.java
@@ -316,7 +316,7 @@ public class Cred {
}
public static void batchDelete(StringBuilder sb, List<String> row) {
- Long l = Long.parseLong(row.get(5));
+ long l = Long.parseLong(row.get(5));
String date = Chrono.batchFmt.format(new Date(l));
sb.append("DELETE from authz.cred WHERE id='");
sb.append(row.get(1));
@@ -326,9 +326,6 @@ public class Cred {
sb.append(" AND expires='");
sb.append(date);
sb.append("';\n");
-// sb.append(" AND expires=dateof(maxtimeuuid(");
-// sb.append(row.get(5));
-// sb.append("));\n");
}
diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java
index 087ab952..3d26ce99 100644
--- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java
+++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/update/Remove.java
@@ -94,7 +94,14 @@ public class Remove extends Batch {
remove.add(new File(logDir, args()[i]));
}
} else {
- remove.add(new File(logDir,"Delete"+Chrono.dateOnlyStamp()+".csv"));
+ final String ending = Chrono.dateOnlyStamp()+".csv";
+ for (File file : logDir.listFiles(f -> {
+ String name = f.getName();
+ return name.endsWith(ending) && (
+ name.startsWith("Delete") || name.startsWith("Clean."));
+ })) {
+ remove.add(file);
+ };
}
for(File f : remove) {