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

Ajaxify retry and remove links in Failure queue. Prevent expensive p… #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

knappe
Copy link

@knappe knappe commented May 21, 2015

…age reloads when removing or retrying links.

@knappe
Copy link
Author

knappe commented May 21, 2015

I'd love to hear some feedback on this PR.

The goal was to remove the expensive cycle of reloading the page for each job that has been removed from the failure queue. Often I've found that this cycle of removing or retrying with a reloading of the page can take much too long on an overloaded queue. Ideally this PR would shorten the cycle of getting bad jobs out of the queue by reducing the long load cycle.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 83.39% when pulling 4ab4d52 on knappe:Ajaxify-Remove-Retry-Links into 10f2d2e on resque:master.

@knappe
Copy link
Author

knappe commented May 21, 2015

This looks to have failed (only) on Ruby 2.2 to install sqlite3.

An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.

@@ -19,7 +19,7 @@ class FailuresControllerTest < ActionController::TestCase
it "deletes the failure" do
Resque::Failure.expects(:remove).with('123')
visit(:destroy, {:id => 123}, :method => :delete)
assert_redirected_to failures_path
assert_response(:success, '{sucess: true}')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/sucess/success ?

@mcfiredrill
Copy link

Thanks for your PR!
It looks great.

Unfortunately I probably won't have time to try this out properly anytime soon.

Could anyone else contributing PR's to this project perhaps give a 👍 ? @mattgibson @kirillplatonov

@knappe knappe force-pushed the Ajaxify-Remove-Retry-Links branch from 4ab4d52 to 9b3acc7 Compare May 21, 2015 03:55
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 83.39% when pulling 9b3acc7 on knappe:Ajaxify-Remove-Retry-Links into 10f2d2e on resque:master.

@knappe
Copy link
Author

knappe commented May 21, 2015

One thing of note here.

I had some trouble testing this out because mocking out a Resque::Failure for the full stack gave me some trouble. I'd appreciate it if someone check if this works well for a legitimate failure.

@mattgibson
Copy link

That failure is the same on that I ran into. Bundle update fixes it. I'll make a PR later to do a bundle update for master, which should fix it for all PRs. Will take a look at the code properly then.

@mcfiredrill
Copy link

@knappe The tests should pass now if you rebase on master.

…ge reloads when removing or retrying links.
@knappe knappe force-pushed the Ajaxify-Remove-Retry-Links branch from 9b3acc7 to 0a23909 Compare May 26, 2015 06:16
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 83.93% when pulling 0a23909 on knappe:Ajaxify-Remove-Retry-Links into 389f448 on resque:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 83.93% when pulling 0a23909 on knappe:Ajaxify-Remove-Retry-Links into 389f448 on resque:master.

@knappe
Copy link
Author

knappe commented May 26, 2015

@mcfiredrill Thanks! Rebase'd.

@knappe
Copy link
Author

knappe commented Jun 16, 2015

@mcfiredrill @mattgibson Anyone had a chance to look at this, by chance?

@mcfiredrill
Copy link

@knappe I haven't actually tried it but the code looks good.

@knappe
Copy link
Author

knappe commented Jul 19, 2015

@mcfiredrill @mattgibson Just checking in. It has been month since I last checked.

@knappe
Copy link
Author

knappe commented Sep 18, 2015

@mcfiredrill @mattgibson @kirillplatonov PR has been ready since May, any chance I could get someone to take a look at it?

@omarqureshi
Copy link

As much as I hate them, a browser driven test is probably needed here since it is Javascript.

Must the Javascript be part of the view? Can we not separate out into its own asset perhaps?

I'll take a look at what this does for real, and comment on the code directly as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants