-
Notifications
You must be signed in to change notification settings - Fork 50
Expose and Filter By Executor ID #540
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
base: main
Are you sure you want to change the base?
Conversation
qianl15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good fix. Let's also implement this in other SDKs.
| query = query.where( | ||
| SystemSchema.workflow_status.c.queue_name == input.queue_name | ||
| ) | ||
| if input.executor_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add this to Conductor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Future PR
| # Search only currently enqueued workflows | ||
| self.queues_only: bool = False | ||
| # Search only for workflows run by this executor | ||
| self.executor_id: Optional[str] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, it might be better to make this a list of IDs instead of just one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comparable options (queue name, app version) are singles. Now, maybe we make those all lists later (or allow you to pass in either a single or a list), but that's a larger change to the API.
You can now retrieve your executor ID from
DBOS.executor_id. Additionally, you can now filter by executor ID inlist_workflowsand `list_queued_workflows.