@task(queue='web')
def finish_build(version_pk, build_pk, hostname=None, html=False, localmedia=False, search=False, pdf=False, epub=False):
 version = Version.objects.get(pk=version_pk)
 build = Build.objects.get(pk=build_pk)
 if html:
  version.active = True
  version.built = True
  version.save()
 if (not pdf):
  clear_pdf_artifacts(version)
 if (not epub):
  clear_epub_artifacts(version)
 move_files(version_pk=version_pk, hostname=hostname, html=html, localmedia=localmedia, search=search, pdf=pdf, epub=epub)
 broadcast(type='app', task=symlink_project, args=[version.project.pk])
 update_static_metadata.delay(version.project.pk)
 fileify.delay(version.pk, commit=build.commit)
 update_search.delay(version.pk, commit=build.commit)

@ task ( queue = 'web' ) def finish_build ( version_pk , build_pk , hostname = None , html = False , localmedia = False , search = False , pdf = False , epub = False ) : version = Version . objects . get ( pk = version_pk ) build = Build . objects . get ( pk = build_pk ) if html : version . active = True version . built = True version . save ( ) if ( not pdf ) : clear_pdf_artifacts ( version ) if ( not epub ) : clear_epub_artifacts ( version ) move_files ( version_pk = version_pk , hostname = hostname , html = html , localmedia = localmedia , search = search , pdf = pdf , epub = epub ) broadcast ( type = 'app' , task = symlink_project , args = [ version . project . pk ] ) update_static_metadata . delay ( version . project . pk ) fileify . delay ( version . pk , commit = build . commit ) update_search . delay ( version . pk , commit = build . commit )
build finished .