modd icon indicating copy to clipboard operation
modd copied to clipboard

Is there a way to control how ofter restarts occur?

Open and-semakin opened this issue 6 years ago • 2 comments

For example, I have a file that changes very often (IDE periodically saves source code to disk), but I don't want to restart a service this often, because restart is expensive. What I would prefer is to restart a deamon once in 30 seconds or even less often regardless that files are changing all the time. Is there a way to set some debounce/throttle logic?

and-semakin avatar Sep 18 '19 16:09 and-semakin

I haven't done exactly this but i've used various tricks with sleep with various success. Maybe something like this:

{
	daemon: echo build ; exec sleep 30
}

or maybe

{
        daemon: while true; do echo > dummy ; sleep 30 ; done
}

dummy {
        prep: echo build
}

wader avatar Sep 18 '19 17:09 wader

hopefully fixed in #101

pavel-kolesnikov avatar May 05 '21 17:05 pavel-kolesnikov