@project_signals.after_create_registration.connect
def after_register(src, dst, user):
 from website.archiver import tasks
 archiver_utils.before_archive(dst, user)
 if (dst.root != dst):
  return
 archive_tasks = [tasks.archive(job_pk=t.archive_job._id) for t in dst.node_and_primary_descendants()]
 handlers.enqueue_task(celery.chain(archive_tasks))

@ project_signals . after_create_registration . connect def after_register ( src , dst , user ) : from website . archiver import tasks archiver_utils . before_archive ( dst , user ) if ( dst . root != dst ) : return archive_tasks = [ tasks . archive ( job_pk = t . archive_job . _id ) for t in dst . node_and_primary_descendants ( ) ] handlers . enqueue_task ( celery . chain ( archive_tasks ) )
blinker listener for registration initiations .