Browse Source

feat: run backfill_file_metadata as background job on pod startup

Launches the management command in the background immediately after
migrations so FileMetadata rows are populated for pre-existing files
without delaying pod readiness.  A comment marks the line for removal
once the fleet is fully backfilled.

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

5
docker/startup_scripts/start.sh

@ -275,6 +275,11 @@ main() {
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