Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Commit

Permalink
Rename pusher variable
Browse files Browse the repository at this point in the history
Use a name that is more appropriate for the work the pusher object does.
  • Loading branch information
blowmage committed Jun 11, 2018
1 parent f628d2d commit 7ccc993
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ def run_background
next
end

time_since_first_publish = Time.now - @batch_created_at
if time_since_first_publish > @interval
time_since_batch_creation = Time.now - @batch_created_at
if time_since_batch_creation > @interval
# interval met, publish the batch...
push_batch_request!
@cond.wait
else
# still waiting for the interval to publish the batch...
@cond.wait(@interval - time_since_first_publish)
@cond.wait(@interval - time_since_batch_creation)
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ def run_background
next
end

time_since_first_publish = Time.now - @batch_created_at
if time_since_first_publish > @interval
time_since_batch_creation = Time.now - @batch_created_at
if time_since_batch_creation > @interval
# interval met, publish the batch...
push_batch_request!
@cond.wait
else
# still waiting for the interval to publish the batch...
@cond.wait(@interval - time_since_first_publish)
@cond.wait(@interval - time_since_batch_creation)
end
end
end
Expand Down

0 comments on commit 7ccc993

Please sign in to comment.