Skip to content
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

add dispatch.worker #163

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add dispatch.worker #163

wants to merge 1 commit into from

Conversation

achille-roussel
Copy link
Contributor

Still work in progress, please leave feedback on the API and behavior.

Things left to do or decide:

  • should dispatch.run stop when a worker returns?
  • should workers be restarted automatically?
  • how do we allow workers to be canceled?
  • dp we add .worker in the FastAPI integration as well?

@achille-roussel achille-roussel added the enhancement New feature or request label May 12, 2024
@achille-roussel achille-roussel self-assigned this May 12, 2024


def worker(fn: Callable[None, None]) -> Callable[None, None]:
"""Decorator declaring workers that will be started when dipatch.run is called."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add more color about what a worker is to avoid confusion with other frameworks/workflow orchestrator systems which heavily use the same term.

@chriso chriso changed the title add dispatch.worker and dispatch.batch add dispatch.worker May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants