Closed maleck13 closed 6 years ago
Maybe this is okay. I'd have to think more about it, but originally the idea was the jobs did some work, sent a message with some information, and the subscribers would then decide what the state should be.
@jmrodri We spoke through this at some point over the last week. Commenting here for posterity (and to remind myself of my own thoughts). Conceptually, it makes sense for the jobs themselves to own and report their own JobState
rather than subscribers. We got away with subscribers setting the value because jobs have always only triggered a singular event at their conclusion, and returned an error if something went wrong, otherwise they were assumed to have successfully completed. It's apparent that jobs with progress updates will likely need to report them as state, and a subscriber will be unable to set this value since the Job
is ultimately the authority on its own state.