Closed coryschwartz closed 1 year ago
Add a flag to wait until the lock can be acquired.
This is to facilitate lock acquisition in scripts.
This is how it works:
create a new lock
./filecoin-chain-archiver nodelocker operator lock abc pass peerid:abc, acquired:true, expiry:2022-11-04 17:39:56.820841486 -0700 PDT
Using the same secret, you can update the lock, as usual.
/filecoin-chain-archiver nodelocker operator lock abc pass peerid:abc, acquired:true, expiry:2022-11-04 17:40:53.458506528 -0700 PDT
./filecoin-chain-archiver nodelocker operator lock abc pass2 peerid:abc, acquired:false, expiry:2022-11-04 17:41:52.042761722 -0700 PDT 2022-11-04T17:40:55.100-0700 ERROR filecoin-chain-archiver filecoin-chain-archiver/main.go:44 exit {"error": "lock not aquired"} echo $? 1
./filecoin-chain-archiver nodelocker operator lock -w abc pass2 peerid:abc, acquired:false, expiry:2022-11-04 17:48:02.350208491 -0700 PDT peerid:abc, acquired:true, expiry:2022-11-04 17:49:03.357054703 -0700 PDT
echo $? 0
Add a flag to wait until the lock can be acquired.
This is to facilitate lock acquisition in scripts.
This is how it works:
create a new lock
Using the same secret, you can update the lock, as usual.
echo $? 0