if the job's startAfter is changed, tell the jobQueue to go through the timed jobs again in case the new time changes the scheduling
This commit is contained in:
@ -189,6 +189,12 @@ public class JobQueue {
|
||||
return;
|
||||
}
|
||||
|
||||
public void timingUpdated() {
|
||||
synchronized (_timedJobs) {
|
||||
_timedJobs.notifyAll();
|
||||
}
|
||||
}
|
||||
|
||||
public int getReadyCount() {
|
||||
synchronized (_readyJobs) {
|
||||
return _readyJobs.size();
|
||||
|
@ -33,7 +33,15 @@ public class JobTiming implements Clock.ClockUpdateListener {
|
||||
*
|
||||
*/
|
||||
public long getStartAfter() { return _start; }
|
||||
public void setStartAfter(long startTime) { _start = startTime; }
|
||||
public void setStartAfter(long startTime) {
|
||||
_start = startTime;
|
||||
// sure, this current job object may not already be on the queue, so
|
||||
// telling the queue of the update may be irrelevent...
|
||||
// but...
|
||||
// ...
|
||||
// who cares? this helps in the case where it is on the queue
|
||||
_context.jobQueue().timingUpdated();
|
||||
}
|
||||
|
||||
/**
|
||||
* # of milliseconds after the epoch the job actually started
|
||||
|
Reference in New Issue
Block a user