moved some frontends/* to new backends/; backends are threads running in background, no frontend
This commit is contained in:
parent
fc33883fd9
commit
2388a945a4
4 changed files with 16 additions and 9 deletions
|
|
@ -1,13 +1,13 @@
|
|||
"""
|
||||
A HTTPS frontend to the current Linspector instance.
|
||||
A HTTPS backend to the current Linspector instance.
|
||||
|
||||
A Webserver listening for requests to give information about the internal state of linspector.
|
||||
(maybe providing a JSON API to the instance too...)
|
||||
"""
|
||||
|
||||
from lib.frontends.frontend import Frontend
|
||||
from lib.backends.backend import Backend
|
||||
|
||||
|
||||
class HttpsFrontend(Frontend):
|
||||
class HttpsBackend(Backend):
|
||||
def __init__(self, **kwargs):
|
||||
return
|
||||
|
|
@ -5,9 +5,9 @@ Just for the fun in it... Linspector connects to a XMPP Server and are accepting
|
|||
give back information. The Linspector admin client will then be any Jabber Client... ;)
|
||||
"""
|
||||
|
||||
from lib.frontends.frontend import Frontend
|
||||
from lib.backends.backend import Backend
|
||||
|
||||
|
||||
class XmmpFrontend(Frontend):
|
||||
class XmmpBackend(Backend):
|
||||
def __init__(self, **kwargs):
|
||||
pass
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
"""
|
||||
Just the frontends.py stub... ;)
|
||||
Frontends are GUI interfaces to Linspector. This could be a shell or other terminal based GUI.
|
||||
|
||||
If linspector is being started without a frontend "enabled" it just is doing stuff like: polling, alerting, logging etc.
|
||||
|
||||
Frontends are absolutely no requirement for running Linspector.
|
||||
Frontends are absolutely no requirement for running Linspector. If no frontend is selected Linspector will just log
|
||||
stuff to stdout.
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import os.path as path
|
|||
from apscheduler.scheduler import Scheduler
|
||||
from lib.config.parser import FullConfigParser
|
||||
from lib.core.job import Job
|
||||
from lib.backends.https import HttpsBackend
|
||||
from lib.frontends.lish import LishFrontend
|
||||
|
||||
|
||||
|
|
@ -98,6 +99,13 @@ def main():
|
|||
job.set_logger(log)
|
||||
jobs.append(job)
|
||||
|
||||
#TODO: Load Backend Threads here before initializing the frontend.
|
||||
'''
|
||||
for backend in backends.enabled
|
||||
backend.start
|
||||
|
||||
take care of signals etc. to sthutdown the threads when stopping linspector.
|
||||
'''
|
||||
frontend = LishFrontend(jobs=jobs, scheduler=scheduler, linspectorConfig=linConf)
|
||||
|
||||
log.debug("shutting down scheduler")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue