Skip to content

Commit

Permalink
currentOp command update (#1995)
Browse files Browse the repository at this point in the history
Signed-off-by: sayedppqq <[email protected]>
  • Loading branch information
sayedppqq authored Feb 9, 2024
1 parent 03259fa commit 3b98fbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3b98fbf

Please sign in to comment.