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?
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**
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.