X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e302c2a74072ebe734adfb45fc6b525f299bb9fb..a25971cae157b6bc40037e391db226da36dc9b30:/services/api/lib/eventbus.rb diff --git a/services/api/lib/eventbus.rb b/services/api/lib/eventbus.rb index d32e150ffe..ac53876122 100644 --- a/services/api/lib/eventbus.rb +++ b/services/api/lib/eventbus.rb @@ -116,7 +116,7 @@ class EventBus # Execute query and actually send the matching log rows count = 0 - limit = 20 + limit = 10 logs.limit(limit).each do |l| ws.send(l.as_api_response.to_json) @@ -128,7 +128,7 @@ class EventBus # Number of rows returned was capped by limit(), we need to schedule # another query to get more logs (will start from last_log_id # reported by current query) - EventMachine::schedule do + EventMachine::next_tick do push_events ws, nil end elsif !notify_id.nil? and (ws.last_log_id.nil? or notify_id > ws.last_log_id)