Reset the failure flag in workers on successful runs. #76

Merged
tozh4728 merged 4 commits from fix-worker-stuck-in-failed-state into develop 2025-01-14 14:50:32 +01:00

4 Commits

Author SHA1 Message Date
2d0d3e945e Merge branch 'develop' into fix-worker-stuck-in-failed-state
All checks were successful
Build and test / build-and-test (push) Successful in 17m57s
Deploy to branch.dsv.su.se / deploy (pull_request) Successful in 2m13s
Remove branch deployment from branch.dsv.su.se / cleanup (pull_request) Successful in 10s
2025-01-14 14:27:26 +01:00
c5ac8d32e8 Clean up unused imports
All checks were successful
Deploy to branch.dsv.su.se / deploy (pull_request) Successful in 2m26s
Build and test / build-and-test (push) Successful in 17m18s
2025-01-14 11:45:47 +01:00
2ae13d8461 Add a TODO item that the successful flag should be removed to simply behaviour 2025-01-14 11:45:33 +01:00
377c99021d Reset the failure flag in workers on successful runs.
All checks were successful
Deploy to branch.dsv.su.se / deploy (pull_request) Successful in 2m16s
Build and test / build-and-test (push) Successful in 15m37s
When the switch from Guice to Spring happened all workers became singletons because that's the default in Spring. In Guice they were "prototype" scoped and therefore the worker object was re-created before each execution which reset the successfulWorker field to true.

Now that they're singletons the field is never reset to true after a failure and the worker will be stuck in a failed state even after a subsequent successful run.

This is an issues primarily for the RejectedThesisWorker that relies on the timestamp of the last successful run to determine if there are any new rejections that it should handle. This is necessary because the Daisy API only allow filtering by date (and not time) and there's no other identifying information in the rejection data other than a timestamp.
2025-01-10 13:10:54 +01:00