Skip to content

Option to allow starting-up again #213

Open
@dpwrussell

Description

@dpwrussell

Proposed change

Allow a way to stop, and later start the proxied service again.

At the moment, if the managed process exits with a non-0 exit status, then it will immediately start back up. If the managed process exits with a 0 exit status then the service is not restarted, and if the Jupyter menu item is clicked again, a 500 server error is shown instead of starting the process.

In order to free up resources it would be good to be able to stop the proxied service, then at some later time, decide to start it up again by clicking on the menu item in Jupyter.

Alternative options

Who would use this feature?

If the proxied service is expensive (in terms of resources), then it makes sense to be able to stop it (freeing resources), then later start it again.

(Optional): Suggest a solution

I can think of two reasonable ways to implement this.

  1. A configuration option which causes a 0 exit code to exit cleanly as today, but start a new supervised process if triggered from Jupyter.
  2. An exit status which causes this "restartable" mode, where a new supervised process can be triggered from Jupyter. I'm less keen on this because I don't think there is a status code with those semantics and it might break existing behaviour.
  3. Some hybrid of the two, possibly implemented as some kind of customizable on_exit hook that one could supply.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions