How to use the rx-jupyter.shutdown function in rx-jupyter

To help you get started, we’ve selected a few rx-jupyter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nteract / nteract / applications / play / redux / epics.js View on Github external
mergeMap(({ payload: { serverId } }) => {
      const oldServer = state$.value.entities.serversById[serverId];
      if (!oldServer)
        return of(
          actions.killServerFailed({
            serverId,
            error: `server with id ${serverId} does not exist in store.`
          })
        );
      const { config } = oldServer.server;
      return shutdown(config).pipe(
        mergeMap(() => of(actions.killServerFulfilled({ serverId }))),
        catchError(error => of(actions.killServerFailed({ serverId, error })))
      );
    })
  );