Add versioning workaround support for batch actions
* add `can_cancel` flag for progress page, hide button if set * overhaul populate/refresh/execute to launch socket/subprocess if necessary
This commit is contained in:
parent
cc6fa7058b
commit
44ff02b7af
4 changed files with 241 additions and 98 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2017 Lance Edgar
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -28,6 +28,8 @@ from __future__ import unicode_literals, absolute_import
|
|||
|
||||
import os
|
||||
|
||||
from rattail.progress import ProgressBase
|
||||
|
||||
from beaker.session import Session
|
||||
|
||||
|
||||
|
@ -43,7 +45,7 @@ def get_progress_session(request, key, **kwargs):
|
|||
return session
|
||||
|
||||
|
||||
class SessionProgress(object):
|
||||
class SessionProgress(ProgressBase):
|
||||
"""
|
||||
Provides a session-based progress bar mechanism.
|
||||
|
||||
|
@ -82,6 +84,3 @@ class SessionProgress(object):
|
|||
self.session['value'] = value
|
||||
self.session.save()
|
||||
return not self.canceled
|
||||
|
||||
def destroy(self):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue