Add scheduler output skeleton.

This commit is contained in:
Patrick Jentsch 2019-07-10 14:37:31 +02:00
parent d41702bc51
commit ad0c754b8b
2 changed files with 23 additions and 3 deletions

View File

@ -12,10 +12,11 @@ def scheduler():
'creator': current_user.id, 'creator': current_user.id,
'files': ['file_1', 'file_2', 'file_3'], 'files': ['file_1', 'file_2', 'file_3'],
'service': 'ocr', 'service': 'ocr',
'args': { 'service_args': {
'lang': 'deu' 'lang': 'deu'
} },
'status': 'queued'
} }
job = background_scheduler.add_job(print, trigger='date', args=[job]) job = background_scheduler.add_job(print, trigger='date', args=[job])
print(job) print(background_scheduler.get_jobs())
return render_template('scheduler/index.html.j2', title='Scheduler') return render_template('scheduler/index.html.j2', title='Scheduler')

View File

@ -2,6 +2,25 @@
{% block page_content %} {% block page_content %}
<div class="col s12"> <div class="col s12">
<div class="card">
<div class="card-content">
<span class="card-title">All jobs</span>
<table>
<thead>
<tr>
<th>creator</th>
<th>files</th>
<th>service</th>
<th>service_args</th>
<th>status</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div> </div>
{% endblock %} {% endblock %}