removed support for bottle and pyramid. cherrypy is most easy to integrate and fits to all my needs...
This commit is contained in:
parent
5fe2d053fe
commit
c8bde6f22b
2 changed files with 9 additions and 33 deletions
22
bin/uplink
22
bin/uplink
|
|
@ -172,24 +172,10 @@ def main():
|
|||
elif args.foreground:
|
||||
from threading import Thread
|
||||
if configuration.get_env_var('_server'):
|
||||
if configuration.get_httpserver_framework() == 'bottle':
|
||||
from uplink.server_bottle import Server
|
||||
s = Server(configuration)
|
||||
st = Thread(target=s.run_server, daemon=True)
|
||||
st.start()
|
||||
elif configuration.get_httpserver_framework() == 'cherrypy':
|
||||
from uplink.server_cherrypy import Server
|
||||
s = Server(configuration)
|
||||
st = Thread(target=s.run_server, daemon=True)
|
||||
st.start()
|
||||
elif configuration.get_httpserver_framework() == 'pyramid':
|
||||
from uplink.server_pyramid import Server
|
||||
s = Server(configuration)
|
||||
st = Thread(target=s.run_server, daemon=True)
|
||||
st.start()
|
||||
else:
|
||||
logger.error('[uplink] no http framework configured! '
|
||||
'(bottle, cherrypy and pyramid are supported)')
|
||||
from uplink.server_cherrypy import Server
|
||||
s = Server(configuration)
|
||||
st = Thread(target=s.run_server, daemon=True)
|
||||
st.start()
|
||||
|
||||
while True:
|
||||
for i in range(len(configuration.get_uplinks())):
|
||||
|
|
|
|||
|
|
@ -95,21 +95,11 @@ class Uplink(Daemon):
|
|||
|
||||
def run(self):
|
||||
if self.configuration.get_env_var('_server'):
|
||||
if self.configuration.get_httpserver_framework() == 'bottle':
|
||||
from uplink.server_bottle import Server
|
||||
s = Server(self.configuration)
|
||||
st = Thread(target=s.run_server, daemon=True)
|
||||
st.start()
|
||||
elif self.configuration.get_httpserver_framework() == 'cherrypy':
|
||||
from uplink.server_cherrypy import Server
|
||||
s = Server(self.configuration)
|
||||
st = Thread(target=s.run_server, daemon=True)
|
||||
st.start()
|
||||
elif self.configuration.get_httpserver_framework() == 'pyramid':
|
||||
from uplink.server_pyramid import Server
|
||||
s = Server(self.configuration)
|
||||
st = Thread(target=s.run_server, daemon=True)
|
||||
st.start()
|
||||
from uplink.server_cherrypy import Server
|
||||
s = Server(self.configuration)
|
||||
st = Thread(target=s.run_server, daemon=True)
|
||||
st.start()
|
||||
|
||||
while True:
|
||||
for i in range(len(self.configuration.get_uplinks())):
|
||||
ut = Thread(target=self.fetch_data, daemon=True, args=(i,))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue