Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void execute(JobExecutionContext context) throws JobExecutionException {
- long start = printEntry(context);
- StateTracker tracker = Backbone.STATE;
- NotificationManager notification = Backbone.NOTIFICATION;
- tracker.updateAll();
- Set<AccessPoint> failures = tracker.getFailures();
- if (failures != null && failures.size() > 0) {
- printFailureCount(context, failures.size());
- StringBuilder sb = new StringBuilder();
- for (AccessPoint failure : failures) {
- String identity = failure.getIdentity();
- if (identity.isEmpty())
- identity = "No identity";
- sb.append(
- String.format(
- "[%s] %s\n",
- failure.getMac(),
- identity
- ));
- }
- notification.notifyAllSubscribedTelegram("Failure(s) detected", sb.toString());
- }
- tracker.setNotified(failures);
- printExit(context, start);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement