* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
}
urgent = false;
-
+
sb.setLength(0);
fhh = new File(footer_html);
if(!fhh.exists()) {
}
noAvg = trans.env().newTransNoAvg();
- cqlBatch = new CQLBatch(noAvg.debug(),session);
+ cqlBatch = new CQLBatch(noAvg.debug(),session);
cbl = new CQLBatchLoop(cqlBatch,50,dryRun);
-
+
lastN = new LastNotified(session);
}
/*
- * Note: We try to put things related to Notify as Main Class in Run, where we might have put in
+ * Note: We try to put things related to Notify as Main Class in Run, where we might have put in
* Constructor, so that we can have other Classes call just the "notify" method.
*/
@Override
NotifyBody.load(env.access());
- // Create Intermediate Output
+ // Create Intermediate Output
File logDir = logDir();
Set<File> notifyFile = new HashSet<>();
if(args().length>0) {
e.printStackTrace();
}
- }
+ }
// now create Notification
for(NotifyBody nb : NotifyBody.getAll()) {
int count = notify(noAvg, nb);
trans.info().printf("Emailed %d for %s",count,nb.name());
}
-
+
//
// Do Pending Approval Notifies. We do this separately, because we are consolidating
// all the new entries, etc.
csvList.add(new CSV(access,f));
}
}
-
+
Map<String,Pending> mpending = new TreeMap<>();
Holder<Integer> count = new Holder<>(0);
for(CSV approveCSV : csvList) {
count.set(count.get()+1);
} catch (ParseException e) {
trans.error().log(e);
- }
+ }
break;
}
});
}
}
trans.info().printf("Read %d Reminder Rows", count.get());
-
+
NotifyPendingApprBody npab = new NotifyPendingApprBody(access);
GregorianCalendar gc = new GregorianCalendar();
gc.add(GregorianCalendar.DAY_OF_MONTH, 7); // Get from INFO?
Date oneWeek = gc.getTime();
CSV.Saver rs = new CSV.Saver();
-
+
TimeTaken tt = trans.start("Obtain Last Notifications for Approvers", Trans.SUB);
try {
lastN.add(mpending.keySet());
} finally {
tt.done();
}
-
+
Pending p;
-
+
tt = trans.start("Notify for Pending", Trans.SUB);
List<String> idList = new ArrayList<>();
String id;
String run = nb.type()+nb.name();
String test = dryRun?run:null;
-
+
ONE_EMAIL:
for(String id : nb.users()) {
toList.clear();