deployment - python fabric run function once for all servers -


We have a deployment script that has 5 servers, we run the script and notify us once, though it is 5 Server.

example code:

env.hosts = ['web1', 'web2', 'web3', 'web4', 'web5']

 < Code> def notify (): sendNotify () @task def deployment (): sendNotify () deploying deployment items deploying things deploying  

I think that Be informed will be asked only once, but because there are 5 servers, it is called 5 times.

Maybe you < notify at code> @Runs_once Decorator.

See:


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -