Hi everyone i am currently using prefect cloud wit...
# prefect-cloud
r
Hi everyone i am currently using prefect cloud with my data pipelines and code running in aws ec2 instance , i have written a bash script to make the worker queues run in the background and for some reason the worker queues arent running in the background as expected , is there any way you guys would recommend? , thanks in advance!
m
Hey @Revanth For clarification when you're referring to worker queues are you referring to the Agent? Also is this for prefect cloud 1 or cloud 2?
r
This is the command i was reffering to "prefect agent start -q [work queue name]" and i am using prefect 2 , my bash script looks like this , prefect agent start -q [work queue name] & prefect agent start -q [work queue name] && fg , when i execute this bash script it works fine and prefect was able to pickup it up , but after a day all the tasks were falling and it shows red mark on the worker , and when i run the bash script again it works perfectly fine
was wondering if there is any other way to resolve this , one of the idea was to maybe redirect the output from the bash script into a file and see if it was throwing any error? , and the second ideas was to maybe run a cron job every x hours and this way i would avoid this issue , would love to know what you would recommend
m
We actually have some recipe templates for building this out here https://github.com/PrefectHQ/prefect-recipes/tree/main/devops/infrastructure-as-code/aws, you could also check out this template from https://github.com/anna-geller/dataflow-ops 😄 it's hard to pinpoint the exact issue but following through one of these should get you in the right direction 😄
r
Thank you for the links , i am assuming it must be my bash script thats causing the issue , will look into it and will reach out if i have any other issues