Skip to content

Commit 788c490

Browse files
authored
Handle nil pointer queue url in manage job cron (#1389)
1 parent 4f0bc70 commit 788c490

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/operator/resources/batchapi/manage_resources_cron.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ func ManageJobResources() error {
116116
errors.PrintError(err)
117117
continue
118118
}
119-
120119
if newStatusCode != jobState.Status {
121120
err = errors.FirstError(
122121
writeToJobLogStream(jobKey, msg),
@@ -128,6 +127,10 @@ func ManageJobResources() error {
128127
continue
129128
}
130129
}
130+
if queueURL == nil {
131+
// job has been submitted within the grace period, it may take a while for a newly created queue to be listed in SQS api response
132+
continue
133+
}
131134

132135
err = checkIfJobCompleted(jobKey, *queueURL, k8sJob)
133136
if err != nil {

0 commit comments

Comments
 (0)