This was suggested in #1092, see #1092 (comment)
It would be super-nice if we could verify that the job is "running" when performing the insert and throw an error otherwise.
The associated code lies in DB.pm:
my $query = "INSERT INTO result_entries (hash_id, level, module, testcase, tag, timestamp, args) VALUES $query_values";
https://github.com/pnax/zonemaster-backend/blob/33e32e4927fd9263097b10c222252928befbd9cc/lib/Zonemaster/Backend/DB.pm#L1024
And a following comment provided a proof a concept using a query like INSERT INTO result_entries UNION SELECT id, ? FROM test_results WHERE id = ? AND progress > 0 AND progress < 100 UNION .... See #1092 (comment)