fix cleanup job spilling over 24h
parent
52e756a174
commit
9fd32a1aa6
|
|
@ -1464,8 +1464,9 @@ class KubernetesCleanupCronJob {
|
|||
},
|
||||
],
|
||||
};
|
||||
const hours = new Date().getUTCHours() + 3;
|
||||
batchJob.spec = {
|
||||
schedule: `0 ${new Date().getUTCHours() + 3} * * *`,
|
||||
schedule: `0 ${hours > 24 ? hours - 24 : hours} * * *`,
|
||||
jobTemplate: {
|
||||
spec: {
|
||||
template: { spec },
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -32,8 +32,9 @@ class KubernetesCleanupCronJob {
|
|||
},
|
||||
],
|
||||
};
|
||||
const hours = new Date().getUTCHours() + 3;
|
||||
batchJob.spec = {
|
||||
schedule: `0 ${new Date().getUTCHours() + 3} * * *`,
|
||||
schedule: `0 ${hours > 24 ? hours - 24 : hours} * * *`,
|
||||
jobTemplate: {
|
||||
spec: {
|
||||
template: { spec },
|
||||
|
|
|
|||
Loading…
Reference in New Issue