This commit is contained in:
root 2020-09-21 18:40:41 +01:00
parent 4c6911a96d
commit 296b9164e6
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
from flask import Flask
from flask import Flask, render_template as Render
from flask_rq2 import RQ as _RQ
import rq_dashboard as _RQD
from youtube_dl import YoutubeDL as YDL
from time import sleep
from .log import FeLog
@ -14,15 +15,19 @@ BaseYDLOpts={
},
}
# Init
app=Flask(__name__)
app.config.from_object(_RQD.default_settings)
app.register_blueprint(_RQD.blueprint, url_prefix="/redis")
RQ=_RQ(app)
#Routes
@RQ.job('test', timeout=30)
def DeliberatelyTimesOut():
sleep(35)
@app.route('/')
def index(): return 'hewwo'
def index(): return Render("index.html.j2")
@app.route('/add/timeouttest')
def timeouttest():

View File

@ -1,5 +1,6 @@
Flask~=1.1.2
Flask-RQ2>=18.3
Jinja2~=2.11.2
rq~=1.5.1
rq-dashboard>=0.6.1
rq-scheduler>=0.10.0