mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-08-31 01:02:04 +08:00
ca6f5a2b90
The resubmit state handler already counted RESUBMITTED rows in job_state_history to build the `attempt` variable admins write resubmit conditions against. Anything else wanting the same number has had to hand-roll its own reading of the same rows. Move the definition onto Job so `attempt` and any future caller agree by construction rather than by coincidence. The state handler keeps its loop for the running/queued timestamps, which is a different question about the same rows. No new query: set_final_state appends to state_history before metrics are collected, which loads the collection, so the property reads what the session already holds.