Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that a job is "running" before inserting results #1135

Open
ghost opened this issue Nov 21, 2023 · 0 comments
Open

Check that a job is "running" before inserting results #1135

ghost opened this issue Nov 21, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 21, 2023

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)

@ghost ghost mentioned this issue Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants