openc3/lib/openc3/microservices/decom_microservice.rb
Method limits_change_callback
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def limits_change_callback(packet, item, old_limits_state, value, log_change)
return if @cancel_thread
# Make a copy because packet_time is frozen
packet_time = packet.packet_time.dup
if value
Method run
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run
setup_microservice_topic()
while true
break if @cancel_thread
Method decom_packet
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def decom_packet(_topic, msg_id, msg_hash, _redis)
OpenC3.in_span("decom_packet") do
msgid_seconds_from_epoch = msg_id.split('-')[0].to_i / 1000.0
delta = Time.now.to_f - msgid_seconds_from_epoch
@metric.set(name: 'decom_topic_delta_seconds', value: delta, type: 'gauge', unit: 'seconds', help: 'Delta time between data written to stream and decom start')
Method limits_change_callback
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def limits_change_callback(packet, item, old_limits_state, value, log_change)