Skip to content

Commit

Permalink
fix: cops
Browse files Browse the repository at this point in the history
  • Loading branch information
dsalahutdinov authored and sclinede committed May 4, 2018
1 parent 4100ebb commit e2d77e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/ossert/tasks/ossert.rake
Expand Up @@ -34,7 +34,7 @@ namespace :ossert do
tokens_count = Ossert::Twitter::Credentials.access_tokens.count
per_token = scheduler.capacity_per_token(SCHEDULE_PERIOD)
total_capacity = tokens_count * per_token

puts "Schedule #{total_capacity} of #{projects_count} (limited with capacity #{total_capacity})"
if dry_run
if projects_count > total_capacity
Expand All @@ -43,9 +43,9 @@ namespace :ossert do
end
else
projects_to_schedule = dataset
.limit(total_capacity)
.order(:reference)
.use_cursor
.limit(total_capacity)
.order(:reference)
.use_cursor
scheduler.call(projects_to_schedule)
end
end
Expand Down

0 comments on commit e2d77e8

Please sign in to comment.