Class: RestFtpDaemon::Worker
- Inherits:
-
Object
- Object
- RestFtpDaemon::Worker
- Includes:
- NewRelic::Agent::Instrumentation::ControllerInstrumentation, LoggerHelper
- Defined in:
- lib/rest-ftp-daemon/worker.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(wid) ⇒ Worker
constructor
A new instance of Worker.
Constructor Details
#initialize(wid) ⇒ Worker
Returns a new instance of Worker.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rest-ftp-daemon/worker.rb', line 10 def initialize wid # Logger @logger = RestFtpDaemon::LoggerPool.instance.get :workers @log_worker_status_changes = true # Worker name @wid = wid # Set thread context Thread.current.thread_variable_set :wid, wid Thread.current.thread_variable_set :started_at, Time.now worker_status WORKER_STATUS_STARTING end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
4 5 6 |
# File 'lib/rest-ftp-daemon/worker.rb', line 4 def logger @logger end |