#3 circologctl: pause -wait-time error on subsequent pause

Open
opened 5 years ago by boyska · 0 comments
boyska commented 5 years ago

If you run pause -wait-time 1h, then (before that hour is passed) run another pause command, you would expect that the previous action postponed to +1h is canceled. This is not the case.

Here is an example.

% curl  --unix-socket /tmp/circologd-ctl.sock 'localhost/status'  -s|jq .
{
  "status": {
    "paused": false,
    "size": 20
  }
}
% circologctl pause -wait-time '5s'
paused
% circologctl pause 
unpaused                                                                            
# wait some seconds...
toggling again
% curl  --unix-socket /tmp/circologd-ctl.sock 'localhost/status'  -s|jq .
{
  "status": {
    "paused": true,
    "size": 20
  }
}

The error is that the togglePause goroutine is never canceled.

If you run `pause -wait-time 1h`, then (before that hour is passed) run another pause command, you would expect that the previous action postponed to +1h is canceled. This is not the case. Here is an example. ``` % curl --unix-socket /tmp/circologd-ctl.sock 'localhost/status' -s|jq . { "status": { "paused": false, "size": 20 } } % circologctl pause -wait-time '5s' paused % circologctl pause unpaused # wait some seconds... toggling again % curl --unix-socket /tmp/circologd-ctl.sock 'localhost/status' -s|jq . { "status": { "paused": true, "size": 20 } } ``` The error is that the `togglePause` goroutine is never canceled.
Sign in to join this conversation.
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.