Skip to content

Conversation

whilenot-dev
Copy link

@whilenot-dev whilenot-dev commented Dec 5, 2024

Summary

Following this discussion, this is a draft to inject a unique worker ID into the app state of an application. Feedback welcome!

The worker ID should be consistent across restarts and provide the missing building block for idempotent startup- and shutdown routines in the lifespan of a worker.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.

@whilenot-dev whilenot-dev changed the title Feat/unique worker Unique Worker ID Dec 5, 2024
@whilenot-dev
Copy link
Author

whilenot-dev commented Dec 5, 2024

Before I'll tackle the test coverage I'd like to have some feedback first:

  1. Should I limit the worker ID injection to multiprocess-mode only?
  2. Should I document the injection more like a warning? Can the injection be considered a bad sursprise?
  3. How about the simplicity, @Kludex? :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant