We want to experiment with developing a custom wor...
# ask-community
f
We want to experiment with developing a custom worker. How can I run a Prefect worker on my terminal? Let’s say I want to run the default ProcessWorker directly on the terminal without creating a Python package, without building a Docker image, etc.
d
I think it's required to have a python package because you need to use an entrypoint for Prefect to discover your worker Using Poetry we've created the entrypoint this way
Copy code
[tool.poetry.plugins."prefect.collections"]
"infrahubasync" = "infrahub.workers.infrahub_async"
The code for our worker is here https://github.com/opsmill/infrahub/blob/stable/backend/infrahub/workers/infrahub_async.py Once the entrypoint exist, we're able to start our own worker with the following command
Copy code
prefect worker start --type infrahubasync --pool XXX --with-healthcheck
We recently developed our own worker too, but I'm very much learning
🙏 1
f
That’s helpful. Thanks!