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?