ixti/sidekiq-throttled

Reset button on Web interface returns 404

jsmestad opened this issue · 5 comments

The "Reset" button on the throttled interface returns a 404 Not Found though everything else on the Throttled page looks correct. Any ideas on what to check?

ixti commented

Which version of sidekiq and sidekiq-throttled are you using?

Sidekiq 4.2.10
sidekiq-throttled 0.7.2

ixti commented

I was able to reproduce that. Thanks for the report. Will find solution ASAP

@ixti awesome, would love to pitch in if you can give me any insight into what is happening

ixti commented

So, we add delete action. According to specs, that delete action works perfectly correct. There's one trick about DELETE verb. There's no way to "issue" that verb using simple html attribute, so usually either XHR is used, or magic _method param is passed instead as part of POST form.

So, after sidekiq moved away from sinatra, I believe they have dropped support of that magic param. And most likely the solution is to simply replace method="post" with method="delete" for the form of the reset button. Although I'm not sure if that will be the right solution. So far I believe going the most dumb way will be better:

  1. bind action to post instead of delete
  2. change action's url to be throttled/{id}/reset