mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-25 13:02:15 +03:00
db2935b877
## Context With the addition of cronjobs, the app is building a lot of jobs and stores them indefinitely. There is no real point to keep all of them in the queue once they have been processed (completed or failed) so we are adding a new default option to the bull-mq driver ## Implementation See bull-mq JobsOption doc ```typescript /** * If true, removes the job when it successfully completes * When given a number, it specifies the maximum amount of * jobs to keep, or you can provide an object specifying max * age and/or count to keep. It overrides whatever setting is used in the worker. * Default behavior is to keep the job in the completed set. */ removeOnComplete?: boolean | number | KeepJobs; /** * If true, removes the job when it fails after all attempts. * When given a number, it specifies the maximum amount of * jobs to keep, or you can provide an object specifying max * age and/or count to keep. It overrides whatever setting is used in the worker. * Default behavior is to keep the job in the failed set. */ removeOnFail?: boolean | number | KeepJobs; ``` removeOnFail should be a bit higher since they are the ones we are most likely looking at when needed. |
||
---|---|---|
.. | ||
@types | ||
patches | ||
scripts | ||
src | ||
test | ||
.env.example | ||
.env.test | ||
.eslintrc.js | ||
.gitignore | ||
.prettierignore | ||
.prettierrc | ||
.swcrc | ||
jest.config.ts | ||
nest-cli.json | ||
package.json | ||
project.json | ||
tsconfig.build.json | ||
tsconfig.json |