You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to instantiate a worker instance with CLI wrapper. In this scenario i can only provide workflow names and activity names as strings.
It would be nice to have an SDK option to get python objects with this names or even to instantiate Worker with lists of strings directly. Maybe register types somewhere in *.defn.
Whats your opinion?
The text was updated successfully, but these errors were encountered:
We try not to assume global use of workflows/activities in the SDK. Many users create many workflows/activities and only start some of them in some workers and others in other workers (some may even have the same name). I would recommend maintaining a dict of workflows/activities if you need a form of global lookup. This can be done with a custom decorator if needed.
We do not have a specific recipe. You can have a simple Python script that reads environment variables and builds the sets of workflows/activities based on what those values are (e.g. a dict lookup), but most people hardcode the sets of workflows/activities to a task queue because every worker on a task queue needs to have the same set of workflows/activities, so it often doesn't make much sense to have that be configurable at runtime.
(also feel free to join us on the forums or Slack if that's an easier way for you to discuss)
I'd like to instantiate a worker instance with CLI wrapper. In this scenario i can only provide workflow names and activity names as strings.
It would be nice to have an SDK option to get python objects with this names or even to instantiate
Worker
with lists of strings directly. Maybe register types somewhere in*.defn
.Whats your opinion?
The text was updated successfully, but these errors were encountered: