[MGNLSCH-64] Scheduler discards all programatically added jobs on restart Created: 08/Jun/16 Updated: 12/Mar/20 Resolved: 28/Feb/20 |
|
| Status: | Closed |
| Project: | Scheduler |
| Component/s: | None |
| Affects Version/s: | 2.2, 2.3 |
| Fix Version/s: | 2.3.3 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Ondrej Chytil | Assignee: | Mikaël Geljić |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | groovy, publication, scheduler, workflow | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Template: |
|
||||||||||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||||||||||
| Release notes required: |
Yes
|
||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||
| Epic Link: | Support | ||||||||||||||||||||||||
| Sprint: | 6.2 Ramp-up 17, 6.2 Ramp-up 18 | ||||||||||||||||||||||||
| Story Points: | 8 | ||||||||||||||||||||||||
| Description |
|
Steps to reproduce:
|
| Comments |
| Comment by Richard Gange [ 20/Jan/20 ] |
|
I think one way to workaround this issue is to turn the groovy script into a groovy command. After that you will need an observation job (w/ a delay) that watches the scheduler config for changes. If it changes, call the groovy command from the observation job. |
| Comment by Mikaël Geljić [ 28/Feb/20 ] |
|
Resolved in two parts:
SchedulerListener resumeJobs = new SchedulerListenerSupport() { @Override public void schedulerStarted() { // scheduler.addJob(...) } }; if (scheduler.isStarted()) { // if already started (likely upon startup), resume straight resumeJobs.schedulerStarted(); } if (!scheduler.getListenerManager().getSchedulerListeners().contains(resumeJobs)) { scheduler.getListenerManager().addSchedulerListener(resumeJobs); } |