Module: Services::Hl7MessageTrimmer

Defined in:
app/roles/services/hl7_message_trimmer.rb

Instance Method Summary collapse

Instance Method Details

#trim_messagesObject



5
6
7
8
9
10
# File 'app/roles/services/hl7_message_trimmer.rb', line 5

def trim_messages
  Hl7Message.
    where(status: Hl7Message::STATUS_PROCESSED).
    where("updated_at < ?", Time.now - 30.days).
    destroy_all
end