diff --git a/Changes b/Changes index c84933ea..7b017ee5 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,8 @@ [BUG FIXES] - * #953 fix port reconfig (vlan) fail due to missing DB column data + * #953 port reconfig (vlan) fail due to missing DB column data + * #957 race condition in job queue management when deleting one job 2.060003 - 2022-12-14 diff --git a/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/lib/App/Netdisco/JobQueue/PostgreSQL.pm index 0525d071..e9b655f6 100644 --- a/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -385,7 +385,8 @@ sub jq_delete { if ($id) { schema(vars->{'tenant'})->txn_do(sub { - schema(vars->{'tenant'})->resultset('Admin')->find($id)->delete(); + my $job = schema(vars->{'tenant'})->resultset('Admin')->find($id); + $job->delete() if $job; }); } else {