fix(PROJ-58): Lockfile gegen überlappende Cron-Batch-Läufe + update.sh synct Cron-Dateien
Root Cause für ausbleibende Lastsenkung: update.sh hat /etc/cron.d/archivmail nie auf den Server kopiert, daher fehlten die PROJ-58-Cronzeilen trotz aktivem batch_mode komplett. Jetzt kopiert update.sh die Cron-Datei und alle Wrapper-Skripte bei jedem Deploy automatisch ein. Zusätzlich: Wrapper-Skripte (analog mailpiler indexer.delta.sh) verhindern per Lockfile, dass sich Cron-Läufe bei großem Backlog überlappen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c91eeac0a0
commit
46502abe75
@@ -160,6 +160,15 @@ cp "$BIN_DIR/archivmail" "$INSTALL_DIR/archivmail"
|
||||
ln -sf "$BIN_DIR/archivmail" /usr/local/bin/archivmail
|
||||
log "Backend eingespielt"
|
||||
|
||||
info "Spiele Cron-Jobs ein..."
|
||||
cp "$BUILD_DIR/deploy/cron.d/archivmail" /etc/cron.d/archivmail
|
||||
chmod 644 /etc/cron.d/archivmail
|
||||
for script in "$BUILD_DIR"/deploy/cron.d/*.sh; do
|
||||
cp "$script" "/usr/local/bin/$(basename "$script")"
|
||||
chmod 755 "/usr/local/bin/$(basename "$script")"
|
||||
done
|
||||
log "Cron-Jobs eingespielt (/etc/cron.d/archivmail + Wrapper-Skripte)"
|
||||
|
||||
info "Spiele Frontend ein (standalone)..."
|
||||
# Next.js standalone mirrors the absolute build path — find the dir that contains server.js.
|
||||
# The path is typically: .next/standalone/<build-dir>/server.js
|
||||
|
||||
Reference in New Issue
Block a user