Refactor progress bars somewhat to allow file-based sessions

hoping this solves issue of Apache restart at end of upgrade
This commit is contained in:
Lance Edgar 2017-08-07 18:19:29 -05:00
parent f203f2c377
commit f46e20c119
8 changed files with 48 additions and 37 deletions

View file

@ -489,13 +489,11 @@ class ProductsView(MasterView):
handler = get_batch_handler(self.rattail_config, batch_key,
default=supported[batch_key].spec)
products = self.get_effective_data()
progress_key = 'products.batch'
progress = SessionProgress(self.request, progress_key)
progress = SessionProgress(self.request, 'products.batch')
thread = Thread(target=self.make_batch_thread,
args=(handler, self.request.user.uuid, products, params, progress))
thread.start()
return self.render_progress({
'key': progress_key,
return self.render_progress(progress, {
'cancel_url': self.get_index_url(),
'cancel_msg': "Batch creation was canceled.",
})