-
Notifications
You must be signed in to change notification settings - Fork 60
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
Allow users to name jobs #23
Comments
Yes, the intent was for one to override getJobDisplayName for returning a value which is different from the default. From a user perspective a Job is immutable but this setter violates that (and in an inconsistent way - only going to have an effect upon Job submission). Also, by overriding (vs setter) one could make the value more "dynamic". |
In theory what you are saying is correct; in practice I have 10s of jobs/job classes. For all of them I have to override getJobDisplayName that requires me to add a member variable called name to each, then add a setter and/or a constructor to set that name for the job on creation. Now that sounds tedious, right... I should have a parent class that I inherit from which has that behaviour, except that I am mandated by the framework to inherit from Job. The alternative is for me to Have a set of superclasses called something like NamedJob or something that extends each of the 6 types of Job<>. As for the immutability of the Job, again that should be true, however, every change of status that requires the persistence of a job instance re-saves the display name. So even though I have no intention of changing the display names of jobs, the design does not reflect that requirement at least not when it comes to the display name. |
I don't think any change of job status (or retries) re-persist the job instance. Job information such as status is handled/saved-by JobRecord and the instance is saved by JobInstanceRecord. The former gets updated between invocations and status change but (AFAIK) not the latter. |
I really like the job setting idea. It fits really well. I will have a play and see what I can come up with. Any recommendations? Feel free to close/reject the previous pull request. |
No recommendation. Follow the path of existing JobSetting handling (shouldn't be too bad). |
:) Thank you |
There seems to be a job display name and yet it is always the class name.
Add a method to allow the user to set the job display name rather than having to override the getJobDisplayName in every job
The text was updated successfully, but these errors were encountered: