I am trying to setup a project with Prefect and I ...
# prefect-community
v
I am trying to setup a project with Prefect and I do have setup and teardown process. I could register the flow and project during the setup and could delete the project during teardown but I am not sure how can I remove the entry for Prefect Agent from Prefect Server. Any suggestion? Thanks
n
Hi @Vipul I'm not completely sure what you mean, are you running the Agent in a container? As a Python script/from the CLI? You should be able to send an interruption signal (
Ctrl+C
/
Cmd+C
) to the Agent process at any time to stop it.
v
Yes, that is correct. I am able to stop the agent using the Supervisor but the point I am trying to make is that in Prefect Server UI, I could still see the Agent entry and it is marked as not reachable. I was wondering when I do teardown, I should not see any entry even in Prefect UI. Am I making sense to you? Thanks
n
Got it - you should be able to remove the agent either with the
Remove
or
Clean Up
buttons in the UI or with the
delete_agent
mutation in GraphQL.
v
I see, let me read about delete_agent mutation as I would like to do it as part of teardown process
Thanks Nicholas
n
Yup! Let me know if you have any questions about it