Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset button on Web interface returns 404 #34

Closed
jsmestad opened this issue Jun 12, 2017 · 5 comments
Closed

Reset button on Web interface returns 404 #34

jsmestad opened this issue Jun 12, 2017 · 5 comments
Assignees
Labels

Comments

@jsmestad
Copy link

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
Copy link
Owner

ixti commented Jun 12, 2017

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

@jsmestad
Copy link
Author

Sidekiq 4.2.10
sidekiq-throttled 0.7.2

@ixti ixti self-assigned this Jun 12, 2017
@ixti ixti added the bug label Jun 12, 2017
@ixti
Copy link
Owner

ixti commented Jun 12, 2017

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

@jsmestad
Copy link
Author

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

@ixti
Copy link
Owner

ixti commented Jun 13, 2017

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

@ixti ixti closed this as completed in 661e469 Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants