Skip to content

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

@ghost

Description

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions