From dcc9af946ad09b6c583ac8c929e68cd46d0beee2 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Mon, 21 Jun 2021 21:52:02 -0400 Subject: [PATCH] Avoid logging when sync is unnecessary due to cronjob log output spam --- salt/common/tools/sbin/so-user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-user b/salt/common/tools/sbin/so-user index 62ba737b1..f0c064d03 100755 --- a/salt/common/tools/sbin/so-user +++ b/salt/common/tools/sbin/so-user @@ -241,7 +241,7 @@ function syncAll() { staleCount=$(echo "select count(*) from identity_credentials where updated_at >= Datetime('now', '-${usersFileAgeSecs} seconds');" \ | sqlite3 "$databasePath") 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 syncElastic