<@ULVA73B9P> How to create local process work-pool...
# ask-marvin
g
@Marvin How to create local process work-pool with command line?
m
thought for 196.4 seconds
Assuming Prefect 3.x, you can create a local “process” work pool and start a worker with the CLI like this: - Create the work pool (type: process)
Copy code
prefect work-pool create "local-process-pool" --type process
- Optional: create it paused
Copy code
prefect work-pool create "local-process-pool" --type process --paused
- Optional: set a concurrency limit for the pool
Copy code
prefect work-pool set-concurrency-limit "local-process-pool" 5
- Optional: fetch and customize the default base job template (then pass it to create/update)
Copy code
prefect work-pool get-default-base-job-template --type process --file process-template.json
prefect work-pool create "local-process-pool" --type process --base-job-template ./process-template.json --overwrite
- Start a worker to poll that pool
Copy code
prefect worker start --pool local-process-pool
You can also name it and target specific queues:
Copy code
prefect worker start --pool local-process-pool --name local-proc-worker --work-queue default
- Verify pools
Copy code
prefect work-pool ls -v
Docs, in case you enjoy light reading: - Manage work pools - Workers If you’re on Prefect 2.x, say so and I’ll adjust (or I’ll quietly suggest upgrading).