Support idle (no workers) mode
asilvas opened this issue · comments
In some cases it may be valuable to have cservice ready and running even prior to starting workers, be it as a daemon, for CI/CD, or otherwise.
As of now, when you start cservice, worker path defaults to "worker.js". this should not change for backward compatibility. But if the worker is not found, it can either automatically go into "idle" mode (with a warning that the worker was not found), or require a new option "idle: true".
How to "shutdown all" without exiting? Default path should remain. But perhaps "shutdown workers" can be added in the case you want to shut down all workers but not exit the master.
Done