Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit number of running scripts #89

Open
trueMiskin opened this issue Apr 28, 2021 · 4 comments
Open

Limit number of running scripts #89

trueMiskin opened this issue Apr 28, 2021 · 4 comments

Comments

@trueMiskin
Copy link

trueMiskin commented Apr 28, 2021

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.

@blizzz
Copy link
Member

blizzz commented Apr 28, 2021

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.

@trueMiskin
Copy link
Author

trueMiskin commented Apr 28, 2021

Thanks for quick reply!

Make atomic locks in bash sounds funny :)

@MMan1982
Copy link

Up!I want limit too!

@martin-rueegg
Copy link

martin-rueegg commented Aug 3, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants