-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (23 loc) · 659 Bytes
/
Copy pathmain.py
File metadata and controls
30 lines (23 loc) · 659 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import threading
import time
import traceback
import cherrypy
from feedbuffer import core, log
from feedbuffer.settings import PORT
from feedbuffer.server import Server
_logger = log.get_logger(__name__)
def main():
cherrypy.config.update({
'server.socket_port': PORT,
'server.socket_host': '0.0.0.0',
'checker.check_skipped_app_config': False
})
threading.Thread(target=lambda: cherrypy.quickstart(Server())).start()
while True:
try:
core.scheduler.run()
except Exception:
_logger.error(traceback.format_exc())
time.sleep(1)
if __name__ == '__main__':
main()