workflow_script
workflow_script copied to clipboard
Limit number of running scripts
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.
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.
Thanks for quick reply!
Make atomic locks in bash sounds funny :)
Up!I want limit too!
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.