You should use "monit unmonitor delayed_job_0" when you start the deploy and  
"monit monitor delayed_job_0" when finished (instead of touching and removing 
the /home/business/app/tmp/deploying.txt file).

Regards,
Martin


On 23 Sep 2014, at 00:06, Kieran P <[email protected]> wrote:

> Does anyone know if this is possible using the latest version of Monit?
> 
> Regards
> Kieran
> 
> On 9 September 2014 17:37, Kieran P <[email protected]> wrote:
> When I deploy code to production, I need to stop some tasks (like background 
> workers). But monit naturally restarts them before the deploy is finished. So 
> I need a way to disable starts/restarts when a file is present. Is this 
> possible yet?
> 
> e.g. 
> 
> check process delayed_job_0
>   with pidfile /home/business/app/shared/pids/delayed_job.0.pid
>   when file /home/business/app/tmp/deploying.txt not present
>   start ...
>   stop ...
>   restart ...
> 
> 
> Regards
> Kieran
> 
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to