Class: Libis::Workflow::Mongoid::Run
- Inherits:
-
Object
- Object
- Libis::Workflow::Mongoid::Run
show all
- Includes:
- Base::Run, WorkItemBase
- Defined in:
- lib/libis/workflow/mongoid/run.rb
Instance Method Summary
collapse
#add_item, #get_items, included, #log_history, #status_log, #to_hash
Instance Method Details
#logger ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/libis/workflow/mongoid/run.rb', line 44
def logger
unless self.log_to_file
return self.job.logger
end
logger = ::Logging::Repository.instance[self.name]
return logger if logger
unless ::Logging::Appenders[self.name]
self.log_filename ||= File.join(::Libis::Workflow::Mongoid::Config[:log_dir], "#{self.name}.log")
::Logging::Appenders::File.new(
self.name,
filename: self.log_filename,
layout: ::Libis::Workflow::Mongoid::Config.get_log_formatter,
level: self.log_level
)
end
logger = ::Libis::Workflow::Mongoid::Config.logger(self.name, self.name)
logger.additive = false
logger.level = self.log_level
logger
end
|
#run(action = :run) ⇒ Object
37
38
39
40
41
42
|
# File 'lib/libis/workflow/mongoid/run.rb', line 37
def run(action = :run)
self.tasks = []
self.items = []
super action
end
|