-
Notifications
You must be signed in to change notification settings - Fork 991
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jobs): Fixes creating worker with deleteSuccessfulJobs config set…
…ting in JobManager (#11653) According to the Job documentation, the JobManager's `deleteSuccessfulJobs ` can be used to decide if one wants successfully completed jobs from being deleted from the `BackgroundJobs` table. Keeping job run history around is useful for reporting purposes, such s hoe many jobs run over time, how many fails, how many successes, etc. However, the `deleteSuccessfulJobs` was not being correctly passed to the worker in `createWorker` so the worker always used the default value -- true -- and always deleted the job run record regardless of configuration. This PR fixes this issue by setting the config value when creating the worker.
- Loading branch information
1 parent
cc867c3
commit bef7939
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- fix(jobs): Fixes creating worker with deleteSuccessfulJobs config setting in JobManager (#11653) by @dthyresson | ||
|
||
According to the Job documentation, the JobManager's `deleteSuccessfulJobs ` can be used to decide if one wants successfully completed jobs from being deleted from the `BackgroundJobs` table. | ||
|
||
Keeping job run history around is useful for reporting purposes, such s hoe many jobs run over time, how many fails, how many successes, etc. | ||
|
||
However, the `deleteSuccessfulJobs` was not being correctly passed to the worker in `createWorker` so the worker always used the default value -- true -- and always deleted the job run record regardless of configuration. | ||
|
||
This PR fixes this issue by setting the config value when creating the worker. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters