Krystal
02/01/2024, 4:23 PMMarvin
02/01/2024, 4:24 PMPREFECT_API_URL
and PREFECT_API_KEY
are set correctly for the worker environment and that you have a user or service account with the Worker role.
3. Start a worker with the appropriate command. For example:
bash
prefect worker start --pool your-work-pool-name
4. The worker starts and polls the Prefect API for scheduled flow runs.
The worker will remain online as long as it sends regular heartbeat messages to the Prefect API. By default, a worker is considered offline if it stops sending heartbeat messages for 90 seconds.
If you use Docker or another isolated environment, ensure the Prefect software is installed within that environment as well.
You can find more information in the work pools and workers sections of the Prefect documentation.
Remember, these instructions can vary depending on your specific setup, infrastructure, and Prefect version. If you have custom requirements or experience issues, you might need to delve deeper into the documentation or search for specific configurations related to keeping your worker running in the desired state.