code: function checkIfNoWorkersAndExit() {
              if (!currentWorkersCount) {
                  log('Cluster graceful shutdown: done.');
                  if (shutdownTimer) clearTimeout(shutdownTimer);
                  exitFunction();
              } else {
                  log('Cluster graceful shutdown: wait ' + currentWorkersCount + ' worker' + (currentWorkersCount > 1 ? 's' : '') + '.');
              }
          }
docs: Check if has alive workers and exit.