Selaa lähdekoodia

[CE/SP] `cron` for daily runs of `scripts/flush_all.js` (#25575)

* [CE/SP] `cron` for daily runs of `scripts/flush_all.js`

GitOrigin-RevId: 9616e99c01491e2a410601f4e33917ed47990b11
Miguel Serrano 1 vuosi sitten
vanhempi
sitoutus
cc3b020d88
2 muutettua tiedostoa jossa 15 lisäystä ja 0 poistoa
  1. 1 0
      server-ce/config/crontab-history
  2. 14 0
      server-ce/cron/project-history-flush-all.sh

+ 1 - 0
server-ce/config/crontab-history

@@ -1,3 +1,4 @@
 */20 * * * *  root  /overleaf/cron/project-history-periodic-flush.sh >> /var/log/overleaf/cron-project-history-periodic-flush.log 2>&1
 30 * * * *    root  /overleaf/cron/project-history-retry-soft.sh >> /var/log/overleaf/project-history-retry-soft.log 2>&1
 45 * * * *    root  /overleaf/cron/project-history-retry-hard.sh >> /var/log/overleaf/project-history-retry-hard.log 2>&1
+0 3 * * *     root  /overleaf/cron/project-history-flush-all.sh >> /var/log/overleaf/project-history-flush-all.log 2>&1

+ 14 - 0
server-ce/cron/project-history-flush-all.sh

@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+set -eux
+
+echo "---------------------------------"
+echo "Flush all project-history changes"
+echo "---------------------------------"
+date
+
+source /etc/container_environment.sh
+source /etc/overleaf/env.sh
+cd /overleaf/services/project-history && node scripts/flush_all.js
+
+echo "Done flushing all project-history changes"