mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 09:15:41 +00:00
23 lines
625 B
Python
23 lines
625 B
Python
from flask import render_template
|
|
from . import scheduler
|
|
from flask_login import current_user, login_required
|
|
from .. import background_scheduler
|
|
import json
|
|
|
|
|
|
@scheduler.route('/')
|
|
@login_required
|
|
def scheduler():
|
|
job = {
|
|
'creator': current_user.id,
|
|
'files': ['file_1', 'file_2', 'file_3'],
|
|
'service': 'ocr',
|
|
'service_args': {
|
|
'lang': 'deu'
|
|
},
|
|
'status': 'queued'
|
|
}
|
|
job = background_scheduler.add_job(print, trigger='date', args=[job])
|
|
print(background_scheduler.get_jobs())
|
|
return render_template('scheduler/index.html.j2', title='Scheduler')
|