| Line 496... |
Line 496... |
| 496 |
|
496 |
|
| 497 |
// Dispatch any notification_schedule rows whose scheduled_timestamp <= now.
|
497 |
// Dispatch any notification_schedule rows whose scheduled_timestamp <= now.
|
| 498 |
// Same code path as the hourly cron in NotificationDispatchScheduler, but callable
|
498 |
// Same code path as the hourly cron in NotificationDispatchScheduler, but callable
|
| 499 |
// on demand from dev / staging where the isProd gate normally blocks the cron.
|
499 |
// on demand from dev / staging where the isProd gate normally blocks the cron.
|
| 500 |
// Usage: --dispatchScheduledNotifications [--batch=200]
|
500 |
// Usage: --dispatchScheduledNotifications [--batch=200]
|
| 501 |
if (args.containsOption("dispatchScheduledNotifications")) {
|
501 |
/*if (args.containsOption("dispatchScheduledNotifications")) {
|
| 502 |
int batch = 200;
|
502 |
int batch = 200;
|
| 503 |
if (args.containsOption("batch")) {
|
503 |
if (args.containsOption("batch")) {
|
| 504 |
try { batch = Integer.parseInt(args.getOptionValues("batch").get(0)); }
|
504 |
try { batch = Integer.parseInt(args.getOptionValues("batch").get(0)); }
|
| 505 |
catch (Exception ignored) { }
|
505 |
catch (Exception ignored) { }
|
| 506 |
}
|
506 |
}
|
| 507 |
System.out.println("Dispatching due scheduled notifications (batch=" + batch + ")...");
|
507 |
System.out.println("Dispatching due scheduled notifications (batch=" + batch + ")...");
|
| 508 |
int attempted = notificationService.dispatchDueScheduled(batch);
|
508 |
int attempted = notificationService.dispatchDueScheduled(batch);
|
| 509 |
System.out.println("Attempted: " + attempted + " row(s)");
|
509 |
System.out.println("Attempted: " + attempted + " row(s)");
|
| 510 |
System.exit(0);
|
510 |
System.exit(0);
|
| 511 |
}
|
511 |
}*/
|
| 512 |
|
512 |
|
| 513 |
if (args.containsOption("ticketClosed")) {
|
513 |
if (args.containsOption("ticketClosed")) {
|
| 514 |
// Redirected to TicketRelatedScheduledTask which handles auto-close as part of escalateTicket
|
514 |
// Redirected to TicketRelatedScheduledTask which handles auto-close as part of escalateTicket
|
| 515 |
ticketRelatedScheduledTask.escalateTicket();
|
515 |
ticketRelatedScheduledTask.escalateTicket();
|
| 516 |
System.exit(0);
|
516 |
System.exit(0);
|