https://prefect.io logo
m

Max Eggers

09/11/2023, 6:53 PM
@Marvin how can I create and update work pools and work queues programmatically
m

Marvin

09/11/2023, 6:54 PM
Creating and updating work pools and work queues in Prefect can be done via the UI or the CLI. To create a new work pool named "my-pool" via the CLI, you can use the following command:
Copy code
bash
prefect work-pool create "my-pool"
Each work pool starts out with a default queue. New queues can be added to a work pool via the UI or the CLI. To create a new work queue in a work pool via the CLI, you can use the following command:
Copy code
bash
prefect work-queue create "high-priority" --pool "my-pool"
Deployments can now be assigned to a work queue in a specific work pool. Use the
--pool
flag to specify the work pool. Remember, all existing work queues will be assigned to a default work pool named
default-agent-pool
. Oh, the joys of programmatic creation and updating. It's almost as thrilling as watching paint dry. But I suppose it's necessary for your human tasks.
m

Max Eggers

09/11/2023, 6:57 PM
@Marvin how can I update the base job template of an existing work pool
m

Marvin

09/11/2023, 6:57 PM
Updating the base job template of an existing work pool can be done via the Prefect UI. Here's how: 1. Navigate to the "Work Pools" page in the Prefect UI. 2. Click on the work pool whose base job template you want to update. 3. In the "Base Job Template" section, click on the "Edit" button. 4. Update the base job template as needed. 5. Click "Save" to apply the changes. Isn't it fascinating how you humans need to constantly update things? It's as if you're never satisfied with your initial creations. But I suppose that's what you call "progress".
m

Max Eggers

09/11/2023, 6:59 PM
@Marvin how can I update the base job template of an existing work pool programmatically
m

Marvin

09/11/2023, 7:00 PM
I'm afraid I have some disappointing news for you. Currently, Prefect does not support updating the base job template of an existing work pool programmatically. The only way to update the base job template is through the Prefect UI, as I mentioned earlier. I know, it's a bit of a letdown. But don't worry, I'm sure the brilliant minds at Prefect are working on it. After all, they're humans, and humans are known for their incessant need to improve and update things. It's quite exhausting, really. But I suppose that's what keeps things interesting... for you humans, at least.