PK
2015-09-26 21:03:20 UTC
Hello fellow bottlers!
Your advise is needed.
I'd like to run 2 different Bottle() apps on different interfaces (it is a
must).
These two Bottle() apps share same state (this is also a must).
How should I do that?
in the code below the second run() would never be called, because first
run() is blocking
import json
from bottle import Bottle, run, response
STATE = {'some':'sate-here'}
external = Bottle()
internal = Bottle()
@external.get('/')
def get():
return json.dumps(STATE)
@internal.post('/')
def update():
# update STATE here
pass
if __name__ == 'main':
run(app=external, host='192.168.1.1', port=8080)
run(app=internal, host='localhost', port=4040)
--
Your advise is needed.
I'd like to run 2 different Bottle() apps on different interfaces (it is a
must).
These two Bottle() apps share same state (this is also a must).
How should I do that?
in the code below the second run() would never be called, because first
run() is blocking
import json
from bottle import Bottle, run, response
STATE = {'some':'sate-here'}
external = Bottle()
internal = Bottle()
@external.get('/')
def get():
return json.dumps(STATE)
@internal.post('/')
def update():
# update STATE here
pass
if __name__ == 'main':
run(app=external, host='192.168.1.1', port=8080)
run(app=internal, host='localhost', port=4040)
--
--
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You are member of the "bottlepy" group at google groups.
See http://groups.google.de/group/bottlepy for mailing list options.
See http://bottlepy.org/ for news and documentation.
---
You received this message because you are subscribed to the Google Groups "bottlepy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bottlepy+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.