Skip to content

Commit

Permalink
fix: ensure the engine is idle even when multiple requests are schedu…
Browse files Browse the repository at this point in the history
…led at once (#31)
  • Loading branch information
milk1000cc authored Dec 31, 2023
1 parent a801a4b commit c0fdbed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vessel/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def idle?
end

def schedule(*requests)
requests.size.times { increase(:req_enqueued) }
requests.flatten.size.times { increase(:req_enqueued) }
scheduler.post(*requests)
end

Expand Down

0 comments on commit c0fdbed

Please sign in to comment.