@project_signals.archive_callback.connect
def archive_callback(dst):
 root = dst.root
 root_job = root.archive_job
 if (not root_job.archive_tree_finished()):
  return
 if root_job.sent:
  return
 if root_job.success:
  from website.archiver import tasks
  tasks.archive_success.delay(dst_pk=root._id, job_pk=root_job._id)
 else:
  archiver_utils.handle_archive_fail(ARCHIVER_UNCAUGHT_ERROR, root.registered_from, root, root.registered_user, dst.archive_job.target_addons)

@ project_signals . archive_callback . connect def archive_callback ( dst ) : root = dst . root root_job = root . archive_job if ( not root_job . archive_tree_finished ( ) ) : return if root_job . sent : return if root_job . success : from website . archiver import tasks tasks . archive_success . delay ( dst_pk = root . _id , job_pk = root_job . _id ) else : archiver_utils . handle_archive_fail ( ARCHIVER_UNCAUGHT_ERROR , root . registered_from , root , root . registered_user , dst . archive_job . target_addons )
blinker listener for updates to the archive task .