Commit e257b7de authored by Matthieu Muffato's avatar Matthieu Muffato
Browse files

bugfix [pgsql]: "argument of AND must be type boolean, not type integer"

parent 9d7edf37
......@@ -541,7 +541,7 @@ sub release_and_age_job {
$self->dbc->do(
"UPDATE job "
.( ($self->dbc->driver eq 'pgsql')
? "SET status = CAST(CASE WHEN $may_retry AND (retry_count<$max_retry_count) THEN 'READY' ELSE 'FAILED' END AS jw_status), "
? "SET status = CAST(CASE WHEN ($may_retry != 0) AND (retry_count<$max_retry_count) THEN 'READY' ELSE 'FAILED' END AS jw_status), "
: "SET status = CASE WHEN $may_retry AND (retry_count<$max_retry_count) THEN 'READY' ELSE 'FAILED' END, "
).qq{
retry_count=retry_count+1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment