Stop Bokeh Server

Hey guys,
I’d like to kill / terminate the Bokeh server without doing Control + C on terminal, I’d rather stop the server from within the application.

I found this post on Stack Overflow which seems to be helpful:

But I couldn’t really understand where / how to use “self.bokeh_serve.kill()” or “self.bokeh_serve.terminate()”.

Also, I couldn’t understand what would be my command variable at this line of code:

self.bokeh_serve = subprocess.Popen(shlex.split(command), shell=False, stdout=subprocess.PIPE)

I’d really appreciate any help or explanations on this.

Thanks in advance,

Lorenzo.

Hi,

In that answer, "bokeh_serve" is the an object that represents (and started) the Bokeh server programmatically.
Are you starting the Bokeh server on the command line by hand? Or are you starting it programmatically?

It might easier to just embed the bokeh server as a library if you want this kind of control:

  https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/standalone_embed.py

Thanks,

Bryan

···

On Nov 27, 2018, at 12:46, [email protected] wrote:

Hey guys,
I'd like to kill / terminate the Bokeh server without doing Control + C on terminal, I'd rather stop the server from within the application.

I found this post on Stack Overflow which seems to be helpful:
https://stackoverflow.com/questions/39487574/how-to-stop-bokeh-server

But I couldn't really understand where / how to use "self.bokeh_serve.kill()" or "self.bokeh_serve.terminate()".

Also, I couldn't understand what would be my command variable at this line of code:
self.bokeh_serve = subprocess.Popen(shlex.split(command), shell=False, stdout=subprocess.PIPE)

I'd really appreciate any help or explanations on this.

Thanks in advance,
Lorenzo.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/8cb79078-519b-4180-9346-60abf4949ff7%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.