-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Jobs should have labels #1095
Comments
EDIT: my bad, it is not crashing the worker at all, false alert, sorry. Has this enforced the presence of labels on jobs? I'm doing support on one of our products and it seems that an upgrade from
However, labels have not been added/enabled on this project (put another way, no code other than the Gemfile.lock was changed for the upgrade). Is this line: job_data["good_job_labels"] = Array(labels) if self.class.labels_migrated? && labels.present? a bit too inquisitive? Thank you. |
No worries 🤗 For context, I consider deprecation warnings to be a "non-breaking change", but I also do tend to not put much effort into limiting/throttling them as I want folks to be aware they have pending migrations. Managing database schema changes within a Semantic Versioning scheme is unfortunately one of the hardest parts of developing a Rails Engine gem. |
Thanks for you reply and explanation. In the end it turned out the webserver could not reboot without the worker being stopped beforehand. The stacktrace was rather vague:
I saw threads and shutdown mentioned in the changelog, so it might have something to do with it but realistically this is a rather edgy case, I'll open an issue if it should ever surface again. Thanks again! |
That sounds really odd; like I'm not quite sure what that means 😬 That error you posted looks like some kind of subprocess issue, and GoodJob doesn't do anything like that. Though I guess I could imagine the webserver being unhappy about something, but I'm not sure if that something would specifically be GoodJob. btw, there's some Puma configuration under this heading that you should use if you aren't: https://github.com/bensheldon/good_job/?tab=readme-ov-file#execute-jobs-async--in-process I'm happy to help if it comes up again 👍 |
I believe GoodJob should have the capability to label jobs with strings for informational purposes (e.g., aggregate the latency of all jobs with a certain label).
This thought came up (again!) as I was writing our my performance recommendations (again!) here: #1091 (reply in thread)
I have observed that developers frequently want to organize their jobs by a service dependency (e.g., everything that sends an email) or some business domain rule (e.g. process a user is separate from process an organization), and these signifiers have to go somewhere... and they end up in the name of the
queue
. This then makes it harder to performance tune because the signifiers, while meaningful, have little to do with the actual latency characteristics of the jobs.GoodJob works around this by allowing for mixed-queue threadpools, but it's not particularly explicit.
My hypothesis is that if we created an obvious place for developers to put those non-performance-related signifiers (e.g. labelled jobs), it would be easier for developers to the name and organize their queues more appropriately for purpose.
Some other possible uses for labels:
The text was updated successfully, but these errors were encountered: