1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-26 12:57:40 +00:00

Made long running tasks cancellable. Added cancel button to cancellable tasks in the task list. Added APP_MODE env variable for determining if the app is running in development, test, or production.

This commit is contained in:
mmonkey
2021-09-29 02:40:12 -05:00
parent 26071d4e7a
commit 46205a1f83
20 changed files with 346 additions and 153 deletions

View File

@@ -124,7 +124,7 @@ def viewer_required(f):
@web.route("/ajax/emailstat")
@login_required
def get_email_status_json():
tasks = WorkerThread.getInstance().tasks
tasks = WorkerThread.get_instance().tasks
return jsonify(render_task_status(tasks))
@@ -1055,7 +1055,7 @@ def category_list():
@login_required
def get_tasks_status():
# if current user admin, show all email, otherwise only own emails
tasks = WorkerThread.getInstance().tasks
tasks = WorkerThread.get_instance().tasks
answer = render_task_status(tasks)
return render_title_template('tasks.html', entries=answer, title=_(u"Tasks"), page="tasks")