Avoid logging when sync is unnecessary due to cronjob log output spam

This commit is contained in:
Jason Ertel
2021-06-21 21:52:02 -04:00
parent e4e3b199fc
commit dcc9af946a

View File

@@ -241,7 +241,7 @@ function syncAll() {
staleCount=$(echo "select count(*) from identity_credentials where updated_at >= Datetime('now', '-${usersFileAgeSecs} seconds');" \ staleCount=$(echo "select count(*) from identity_credentials where updated_at >= Datetime('now', '-${usersFileAgeSecs} seconds');" \
| sqlite3 "$databasePath") | sqlite3 "$databasePath")
if [[ "$staleCount" == "0" ]]; then if [[ "$staleCount" == "0" ]]; then
fail "Users are already in sync. Run 'FORCE_SYNC=1 $0 sync' to force a full sync anyway." return 1
fi fi
fi fi
syncElastic syncElastic