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

AO3-4128-more thorough progress fix #2489

Merged
merged 2 commits into from
Jun 28, 2016

Conversation

shalott
Copy link
Member

@shalott shalott commented Jun 21, 2016

https://otwarchive.atlassian.net/browse/AO3-4128

The progress report was NOT fixed. I've reworked the way it was being done, and also added tests. Now hopefully working for reals. Tests running clean.

Signed-off-by: astolat shalott shalott@gmail.com

Signed-off-by: astolat shalott <shalott@gmail.com>
end

it "should have a signup key" do
expect(PotentialMatch.signup_key(@collection)).to include("#{@collection.id}")

Choose a reason for hiding this comment

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

Prefer to_s over string interpolation.

@shalott shalott added Priority: High - Broken on Test Merge immediately after approval Awaiting Review labels Jun 21, 2016
Signed-off-by: astolat shalott <shalott@gmail.com>
@@ -104,9 +104,14 @@ def self.generate_in_background(collection_id)
required_types = settings.required_types.map {|t| t.classify}

# treat each signup as a request signup first
collection.signups.find_each do |signup|
# because find_each doesn't give us a consistent order, but we don't necessarily
Copy link
Contributor

Choose a reason for hiding this comment

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

What ordering problem did you find with find_each? The Rails documentation says: "[Order] is automatically set to ascending on the primary key (“id ASC”) to make the batch ordering work." So I would expect that to do what you want?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, in retrospect I realized the issue was likely because the job-restarting code was causing the process to start over and over on top of itself. However, I think this remains a better way of handling the progress (doesn't break if user changes name/pseud midstream), so would still rather get this in.

@zz9pzza zz9pzza merged commit 364d366 into otwcode:master Jun 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants