Class: Stackify::AgentBaseSender

Inherits:
Worker show all
Defined in:
lib/stackify/agent_base_sender.rb

Direct Known Subclasses

AgentHTTPSender, UnixSocketSender

Instance Attribute Summary

Attributes inherited from Worker

#name, #type

Instance Method Summary collapse

Methods inherited from Worker

#alive?, #async_perform, #backtrace, #id, #initialize, #perform, #shutdown!, #status

Constructor Details

This class inherits a constructor from Stackify::Worker

Instance Method Details

#send_logs(msgs, attempts = 3) ⇒ Object

send_logs() Function to put the msg in the Worker



8
9
10
11
12
# File 'lib/stackify/agent_base_sender.rb', line 8

def send_logs msgs, attempts = 3
  worker = Stackify::LogsSenderWorker.new('UnixSocketSender worker')
  task = send_logs_task attempts, msgs
  worker.async_perform ScheduleDelay.new, task
end