Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does the "Sleep" command only affect that thread or anything else on the server?

Phumelele Mthimunye
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2024

So in a project i am deploying through bamboo, there is code to add a record to the database should it not exist on startup. Problem is both servers that we deploy to start up at almost the exact same time (milliseconds apart) so after the one server starts up and adds the record, the other server would add the same record as the check to see if it record exists happens too early.

so a solution i thought of was adding an ssh task with a sleep command in-between the tasks deploying the project onto the servers. i did do some testing to see if other API calls on the server would be affected while the deploy is sleeping but it seems that they work fine as the deploy is sleeping.

is there any other possible issues i should be aware of and/or testing for when implementing this sleep command?

1 answer

1 accepted

4 votes
Answer accepted
Ayrijit Swain
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2024

Hi Phumelele,

Welcome to Atlassian community.

If i understand your concern correctly, you wanted to confirm if using "sleep" in bamboo task will only affect the build job in which it is configured OR any other process in Bamboo.

To answer your questions, it will only affect the build job and will pause the execution of that job. Other build jobs being executed in parallel will not be affected by this.

Regards,

Ayrijit Swain

**please don't forget to Accept the answer if your query was answered**

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events