transaction.commit() # We (hopefully) have been avoiding sending send post_save and # version_changed signals in the review process till now (_review() # uses ReviewHelper which should have done all of its update() calls # with _signal=False). # # Now is a good time to send them: the transaction we were in has been # committed, so we know everything is ok. This is important: we need # them to index the app or call update_version() if that wasn't done # before already. if request.method == 'POST': try: post_save.send(sender=Webapp, instance=addon, created=False) post_save.send(sender=Version, instance=version, created=False) if getattr(addon, 'resend_version_changed_signal', False): version_changed.send(sender=addon) del addon.resend_version_changed_signal except Exception: transaction.rollback() raise else: transaction.commit() if resp: return resp raise QueuedApp = collections.namedtuple('QueuedApp', 'app created') def _queue(request, apps, tab, pager_processor=None, date_sort='created',
transaction.commit() # We (hopefully) have been avoiding sending send post_save and # version_changed signals in the review process till now (_review() # uses ReviewHelper which should have done all of its update() calls # with _signal=False). # # Now is a good time to send them: the transaction we were in has been # committed, so we know everything is ok. This is important: we need # them to index the app or call update_version() if that wasn't done # before already. if request.method == 'POST': try: post_save.send(sender=Webapp, instance=addon, created=False) post_save.send(sender=Version, instance=version, created=False) if getattr(addon, 'resend_version_changed_signal', False): version_changed.send(sender=addon) del addon.resend_version_changed_signal except Exception: transaction.rollback() raise else: transaction.commit() if resp: return resp raise QueuedApp = collections.namedtuple('QueuedApp', 'app created') ActionableQueuedApp = collections.namedtuple('QueuedApp', 'app created action_url')
return redirect( reverse('reviewers.apps.review', args=[webapp.app_slug])) # We (hopefully) have been avoiding sending send post_save and # version_changed signals in the review process till now (_review() # uses ReviewHelper which should have done all of its update() calls # with _signal=False). # # Now is a good time to send them: the transaction we were in has been # committed, so we know everything is ok. This is important: we need # them to index the app or call update_version() if that wasn't done # before already. if request.method == 'POST': post_save.send(sender=Webapp, instance=webapp, created=False) post_save.send(sender=Version, instance=version, created=False) if getattr(webapp, 'resend_version_changed_signal', False): version_changed.send(sender=webapp) del webapp.resend_version_changed_signal if resp: return resp raise QueuedApp = collections.namedtuple('QueuedApp', 'app date_field') ActionableQueuedApp = collections.namedtuple( 'QueuedApp', 'app date_field action_url') def _queue(request, apps, tab, pager_processor=None, date_sort='created', template='reviewers/queue.html', data=None, use_es=False): per_page = request.GET.get('per_page', QUEUE_PER_PAGE) pager = paginate(request, apps, per_page)