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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user