workflow_script icon indicating copy to clipboard operation
workflow_script copied to clipboard

Limit number of running scripts

Open trueMiskin opened this issue 4 years ago • 4 comments

Is there any option how limit number of running scripts? For example flow do converting a video and this can be huge load for server.

trueMiskin avatar Apr 28 '21 17:04 trueMiskin

the scripts are being started by the background job in a non-blocking manner, without process management. so, any number of scripts could run.

what you can do right now is control the processes in the script that is being called.

blizzz avatar Apr 28 '21 18:04 blizzz

Thanks for quick reply!

Make atomic locks in bash sounds funny :)

trueMiskin avatar Apr 28 '21 19:04 trueMiskin

Up!I want limit too!

MMan1982 avatar May 30 '21 11:05 MMan1982

I have currently solved the situation by using a script, that

  • checks if a processing instance of it (daemon) is running
  • if not, it starts it
  • if yes or once the daemon started, it writes the command to a fifo
  • the daemon reads the fifo and works off the files, two in parallel
  • if there is now new file waiting on the fifo, the daemon tears itself down

Like this I manage to handle hundreds of relevant file-renames and working them off subsequently.

I use it for image and video processing which is kinda CPU- and memory-intense.

martin-rueegg avatar Aug 03 '22 10:08 martin-rueegg