From 77f477ac62dc30bf16bc6bcae3b1a4d64f054226 Mon Sep 17 00:00:00 2001 From: sayedppqq Date: Tue, 10 Oct 2023 11:54:09 +0600 Subject: [PATCH] command update Signed-off-by: sayedppqq --- pkg/lock.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/lock.go b/pkg/lock.go index 1fd890c70..ad376ab5b 100644 --- a/pkg/lock.go +++ b/pkg/lock.go @@ -129,10 +129,10 @@ func checkIfSecondaryLockedAndSync(mongohost string) error { x := make(map[string]interface{}) args := append([]interface{}{ - "config", + "admin", "--host", mongohost, "--quiet", - "--eval", "JSON.stringify(db.currentOp())", + "--eval", "rs.secondaryOk(); JSON.stringify(db.runCommand({currentOp:1}))", }, mongoCreds...) output, err := sh.Command(MongoCMD, args...).Output() if err != nil {