Browse Source

fix: run backfill_file_metadata immediately after migrate_db

Moves the background backfill job to right after migrate_db so the
base_file_metadata table is guaranteed to exist before the command
runs.  The comment makes the ordering dependency explicit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
file-metafields
Edward Ribeiro 2 weeks ago
parent
commit
13847497ca
  1. 10
      docker/startup_scripts/start.sh

10
docker/startup_scripts/start.sh

@ -269,17 +269,17 @@ main() {
wait_for_pg wait_for_pg
configure_pg_timezone configure_pg_timezone
migrate_db migrate_db
# Backfill FileMetadata rows for files uploaded before MetadataFileField was
# deployed. Runs as a background job so pod startup is not delayed.
# Must be after migrate_db so the base_file_metadata table exists.
# Once all instances have been fully backfilled this line can be removed.
python3 manage.py backfill_file_metadata --batch-size=200 --rate-limit=20 &
configure_solr || true configure_solr || true
configure_sapn configure_sapn
create_admin create_admin
setup_cache_dir setup_cache_dir
fix_logging_and_socket_perms fix_logging_and_socket_perms
# Backfill FileMetadata rows for files uploaded before MetadataFileField was
# deployed. Runs as a background job so pod startup is not delayed.
# Once all instances have been fully backfilled this line can be removed.
python3 manage.py backfill_file_metadata --batch-size=200 --rate-limit=20 &
cat <<'BANNER' cat <<'BANNER'
------------------------------------- -------------------------------------
| ███████╗ █████╗ ██████╗ ██╗ | | ███████╗ █████╗ ██████╗ ██╗ |

Loading…
Cancel
Save