https://prefect.io logo
m

Mary Clair Thompson

12/21/2020, 1:28 PM
You can bring up a local agent using the command 'prefect agent local start', but there doesn't seem to be a similar command for tearing down agents. What's the correct way to bring down an agent?
k

Kyle Moon-Wright

12/21/2020, 4:30 PM
Hey @Mary Clair Thompson, I always use the interrupt with Control + C, I don’t think there’s a recommendation besides this signal. I’ve always been able to get away with this, so there may be another way I’m not aware of…
m

Mary Clair Thompson

12/21/2020, 4:53 PM
It would be nice if there were a cli command that allowed you to stop an agent by including the agent id.
k

Kyle Moon-Wright

12/21/2020, 5:21 PM
Hmm, this is a tough one because your Agent polls outwardly to the Cloud API and can exist anywhere with the Hybrid Execution Model. You can certainly delete the Agent through the Cloud tenant (of course this wouldn’t stop the running process), but Prefect can’t reach into the machine where your Agent lives to interrupt/kill the polling with an API call. There could be a CLI command to add here, so I’ll take that back to the team. Thanks for the feedback!
👍 1