Move changes_files to before search indexing
This signal is used to clear the CDN,
so we want it to happen as soon a possible.
@@ -1539,6 +1539,15 @@ def _create_imported_files(version, commit, build):
build=build,
)
+ # This signal is used for clearing the CDN,
+ # so send it as soon as we have the list of changed files
+ files_changed.send(
+ sender=Project,
+ project=version.project,
+ version=version,
+ files=changed_files,
+ )
+
return changed_files
@@ -1581,14 +1590,6 @@ def _sync_imported_files(version, build, changed_files):
.delete()
)
- # Send signal with changed files
- files_changed.send(
- sender=Project,
- project=version.project,
- version=version,
- files=changed_files,
- )
-
@app.task(queue='web')
def send_notifications(version_pk, build_pk, email=False):
