code: private void stopProcess(ProcessId processId) {
      SQProcess process = processesById.get(processId);
      if (process != null) {
        process.stop(1, TimeUnit.MINUTES);
      }
    }
docs: Request for graceful stop then blocks until process is stopped.
  Returns immediately if the process is disabled in configuration.