Skip to content

Commit c447d8e

Browse files
fix non_block arg (#331)
1 parent fe73911 commit c447d8e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/optimizely/odp/odp_event_manager.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def start!(odp_config)
7373

7474
def flush
7575
begin
76-
@event_queue.push(:FLUSH_SIGNAL, non_block: true)
76+
@event_queue.push(:FLUSH_SIGNAL, true)
7777
rescue ThreadError
7878
@logger.log(Logger::ERROR, 'Error flushing ODP event queue.')
7979
return
@@ -87,7 +87,7 @@ def flush
8787
def update_config
8888
begin
8989
# Adds update config signal to event_queue.
90-
@event_queue.push(:UPDATE_CONFIG, non_block: true)
90+
@event_queue.push(:UPDATE_CONFIG, true)
9191
rescue ThreadError
9292
@logger.log(Logger::ERROR, 'Error updating ODP config for the event queue')
9393
end
@@ -111,7 +111,7 @@ def dispatch(event)
111111

112112
begin
113113
@logger.log(Logger::DEBUG, 'ODP event queue: adding event.')
114-
@event_queue.push(event, non_block: true)
114+
@event_queue.push(event, true)
115115
rescue => e
116116
@logger.log(Logger::WARN, format(Helpers::Constants::ODP_LOGS[:ODP_EVENT_FAILED], e.message))
117117
return
@@ -143,7 +143,7 @@ def stop!
143143
return unless running?
144144

145145
begin
146-
@event_queue.push(:SHUTDOWN_SIGNAL, non_block: true)
146+
@event_queue.push(:SHUTDOWN_SIGNAL, true)
147147
rescue ThreadError
148148
@logger.log(Logger::ERROR, 'Error stopping ODP event queue.')
149149
return
@@ -175,7 +175,7 @@ def run
175175
end
176176

177177
begin
178-
item = @event_queue.pop(non_block: true)
178+
item = @event_queue.pop(true)
179179
rescue ThreadError => e
180180
raise unless e.message == 'queue empty'
181181

0 commit comments

Comments
 (0)