Method: OpenC3::SnoozeBase#not_queued?

Defined in:
lib/openc3/microservices/reaction_microservice.rb

#not_queued?(reaction:) ⇒ Boolean

Returns:

  • (Boolean)


196
197
198
199
200
201
202
203
204
# File 'lib/openc3/microservices/reaction_microservice.rb', line 196

def not_queued?(reaction:)
  key = "#{reaction.name}__#{reaction.snoozed_until}"
  @watch_mutex.synchronize do
    return false if @watch_queue.index(key)
    @watch_queue[@watch_index] = key
    @watch_index = @watch_index + 1 >= @watch_size ? 0 : @watch_index + 1
    return true
  end
end