overleaf/server-ce/init_preshutdown_scripts/01_flush_track_changes
Miguel Serrano 909bb99b9f [CE/SP] Flush redis on docker stop (#11714)
* [CE/SP] Flush redis on `docker stop`

* Extracted `limit` to variable

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>

* Increased logging

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 4bcb4e70988337369acca0e80f243609bd6323ed
2023-02-09 09:06:37 +00:00

11 lines
255 B
Bash
Executable file

#!/bin/sh
cd /overleaf/services/track-changes && node scripts/flush_all.js >> /var/log/sharelatex/track-changes.log 2>&1
EXIT_CODE="$?"
if [ $EXIT_CODE -ne 0 ]
then
echo "track-changes/scripts/flush_all.js failed with exit code $EXIT_CODE"
fi
exit 0