CLI blocks communication (*Nix only)
asilvas opened this issue · comments
"readline" interface blocks the master process on *nix...
Work around this by either moving the input interface to a child process (not visible to other worker processes to keep it clean), or somehow fix the blocking prompts somehow...
Not a bug of cluster-service, but rather readline.createInterface blocks indefinitely if you run the service in the background:
cservice worker.js &
No way to auto-detect if run as background process found, so must manually disable cli if you wish to run as background:
cservice worker.js --cliEnabled false &
If you leverage cserviced
, it'll disable the cli for you automatically.
cserviced worker.js