Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Results from searching gems are not ordered by downloads #432

Closed
janko-m opened this Issue · 10 comments

3 participants

@janko-m

I noticed that the results from searching gems are not ordered by the number of downloads. But when I read the source code (app/models/rubygem.rb), there it looks like they were supposed to be sorted by downloads. So I was just wondering if it's a bug with some database caching or something.

The below screenshot is when searching for "flickr", page 2. You can see that omniauth-flickr, for example, has more than 3000 downloads, and it's already half-a-year old gem.

flickr page 2

@plribeiro3000

+1 here. I also noticed that. Looked at the code too. I think that must be a cache problem or something like that.

@janko-m janko-m referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@janko-m janko-m referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@janko-m janko-m referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@sferik sferik closed this in 582210d
@plribeiro3000

So what, will this task run every day by a cron job? Or has to be called by hand?

@janko-m

I guess they'll put it in a cron job.

@sferik
Owner

Yeah, @evanphx or @tcopeland should be able to take care of that. Once a day should be sufficient, right? Any idea what kind of load running this against the production dataset will put on the database? If it's significant we might need to run it less frequently.

@sferik
Owner

I deployed this code and ran this script for the first time. It took about 10 minutes to complete. The search results for "flickr" now look like this:

@janko-m

Awesome! Thank you! :)

@sferik
Owner

Thanks for the patch. I added it to the weekly cron jobs in 95b9671. I don't think it needs to run any more frequently than that.

@janko-m

Yes, I also wanted to say that it really isn't necessary for it to be run every day. Once a week is great :)

@plribeiro3000

Hey, and how is this task running? Its been some time it since the last time i think. =x

@janko-m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.