mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
[+] Added task scheduler
This commit is contained in:
parent
7ff1d726cc
commit
6fd8cf73e6
4
app.py
4
app.py
@ -1,6 +1,7 @@
|
||||
import http
|
||||
import inspect
|
||||
from typing import Union
|
||||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
|
||||
from flask import (Blueprint, Flask, Response, jsonify, request)
|
||||
from flask_cors import CORS
|
||||
@ -125,4 +126,7 @@ app.register_blueprint(apiBP)
|
||||
|
||||
if __name__ == '__main__':
|
||||
atexit.register(exit_safety)
|
||||
scheduler = BackgroundScheduler()
|
||||
scheduler.add_job(generic_executor.scheduled_actions, 'interval', minutes=1)
|
||||
scheduler.start()
|
||||
app.run(host='0.0.0.0', port=3000, debug=False)
|
||||
|
Loading…
Reference in New Issue
Block a user