Skip to content

Commit 94adc51

Browse files
committed
Fix restartFn bug
1 parent 0fd87db commit 94adc51

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

functions/kubernetes/amqpConnector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async function initialize(queue_name) {
99
conn = await amqplib.connect(`amqp://${process.env.RABBIT_HOSTNAME}`, "heartbeat=60");
1010
}
1111
let ch = await conn.createChannel()
12-
await ch.assertQueue(queue_name, {durable: false, expires: 600000}); // TODO: implement dynamic queue creation & cleanup
12+
await ch.assertQueue(queue_name, {durable: false, expires: 6000000}); // TODO: implement dynamic queue creation & cleanup
1313
channels[queue_name] = ch
1414

1515
}

functions/kubernetes/k8sCommand.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ async function k8sCommandGroup(bufferItems) {
129129
if (getExecutorType(context) === "WORKER_POOL") {
130130
await amqpEnqueueJobs(jobArr, taskIdArr, contextArr, customParams)
131131
} else {
132-
await submitK8sJob(kubeconfig, jobArr, taskIdArr, contextArr, customParams, restartFn)
132+
await submitK8sJob(kubeconfig, jobArr, taskIdArr, contextArr, customParams)
133133
}
134-
jobExitCodes = await synchronizeJobs(jobArr, taskIdArr, contextArr, customParams);
134+
jobExitCodes = await synchronizeJobs(jobArr, taskIdArr, contextArr, customParams, restartFn);
135135
} catch (err) {
136136
console.log("Error when submitting job:", err);
137137
throw err;

functions/kubernetes/k8sJobSubmit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ var createK8sJobYaml = (job, taskIds, context, jobYamlTemplate, customParams) =>
105105
//
106106
//
107107
// Returns: job exit code
108-
var submitK8sJob = async(kubeconfig, jobArr, taskIdArr, contextArr, customParams, restartFn) => {
108+
var submitK8sJob = async(kubeconfig, jobArr, taskIdArr, contextArr, customParams) => {
109109

110110
// Load definition of the the worker job pod
111111
// File 'job-template.yaml' should be provided externally during deployment

0 commit comments

Comments
 (0)