Commit b987963
committed
Emit restart events when job restarted automatically
Send an event through the task itself after the `auto_duplicate` when the job
have been process and send for restart. While the `auto_duplicate` could be
used as a single point for the event's emission it interferes with other
functions which also emit events independently. For instance from the API
restart, it processes the payload and adds data to it, so it left as is.
Using the `restart_openqa_job` from the Restart module should not duplicate
the event which is emitted by the API, which also invoke `auto_duplicate`. And
it should also trigger the event when the job is processed and not while is
queued.
That should make sure that the event is send to AMQP for jobs with
`RETRY` once it is actually triggered.
issue: https://progress.opensuse.org/issues/190557
Signed-off-by: Ioannis Bonatakis <[email protected]>1 parent faa0e5c commit b987963
File tree
3 files changed
+59
-1
lines changed- lib/OpenQA/Task/Job
- t
- api
3 files changed
+59
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
899 | 900 | | |
900 | 901 | | |
901 | 902 | | |
902 | | - | |
| 903 | + | |
| 904 | + | |
903 | 905 | | |
904 | 906 | | |
905 | 907 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments