feat(queue): auto clean up complete and fail jobs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import Context from '../../types/express/context';
|
||||
import flowQueue from '../../queues/flow';
|
||||
import { REMOVE_AFTER_30_DAYS_OR_150_JOBS, REMOVE_AFTER_7_DAYS_OR_50_JOBS } from '../../helpers/remove-job-configuration';
|
||||
|
||||
type Params = {
|
||||
input: {
|
||||
@@ -51,6 +52,8 @@ const updateFlowStatus = async (
|
||||
{
|
||||
repeat: repeatOptions,
|
||||
jobId: flow.id,
|
||||
removeOnComplete: REMOVE_AFTER_7_DAYS_OR_50_JOBS,
|
||||
removeOnFail: REMOVE_AFTER_30_DAYS_OR_150_JOBS
|
||||
}
|
||||
);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user