@celery_app.task(base=ArchiverTask, ignore_result=False)
@logged('archive_success')
def archive_success(dst_pk, job_pk):
 create_app_context()
 dst = Node.load(dst_pk)
 for schema in dst.registered_schema.all():
  if schema.has_files:
   utils.migrate_file_metadata(dst, schema)
 job = ArchiveJob.load(job_pk)
 if (not job.sent):
  job.sent = True
  job.save()
  dst.sanction.ask(dst.get_active_contributors_recursive(unique_users=True))

@ celery_app . task ( base = ArchiverTask , ignore_result = False ) @ logged ( 'archive_success' ) def archive_success ( dst_pk , job_pk ) : create_app_context ( ) dst = Node . load ( dst_pk ) for schema in dst . registered_schema . all ( ) : if schema . has_files : utils . migrate_file_metadata ( dst , schema ) job = ArchiveJob . load ( job_pk ) if ( not job . sent ) : job . sent = True job . save ( ) dst . sanction . ask ( dst . get_active_contributors_recursive ( unique_users = True ) )
archivers final callback .