-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Is your feature request related to a problem? Please describe.
In order to enable Eager Workflow Start we need to find compatible workers that are associated with the current core instance. This feature will provide an internal interface that given a (namespace, task_queue_name) pair provides a list of suitable workers.
Describe the solution you'd like
WorkerRegistry is a singleton object that is lazily initialized and protected by a RwLock. Workers register at creation time (Worker.new_with_pollers()
) and unregister during shutdown (Worker.initiate_shutdown()
).
The main consumer of the query interface is the client, and since we don't want the client crate to depend on other internal crates,
we use dependency injection with a trait defined by the client.
Additional context
This is just a stepping stone towards enabling Eager Workflow Start for core-based languages