Class: OpenWFE::FileHistory

Inherits:
BaseHistory show all
Defined in:
lib/openwfe/expool/history.rb

Overview

Simply dumps the history in the work directory in a file named “history.log” Warning : no fancy rotation or compression implemented here.

Instance Attribute Summary

Attributes inherited from BaseHistory

#entries

Attributes included from ServiceMixin

#service_name

Attributes included from Contextual

#application_context

Instance Method Summary collapse

Methods inherited from BaseHistory

#log

Methods included from HistoryMixin

#log, #service_init

Methods included from ServiceMixin

#service_init

Methods included from Contextual

#get_work_directory, #init_service, #lookup

Methods included from Logging

#ldebug, #ldebug_callstack, #lerror, #lfatal, #linfo, #llog, #lunknown, #lwarn

Methods included from OwfeServiceLocator

#get_engine, #get_error_journal, #get_expool, #get_expression_map, #get_expression_pool, #get_expression_storage, #get_expression_storages, #get_journal, #get_participant_map, #get_scheduler, #get_wfid_generator

Constructor Details

#initialize(service_name, application_context) ⇒ FileHistory

Returns a new instance of FileHistory.



150
151
152
153
154
155
156
157
158
# File 'lib/openwfe/expool/history.rb', line 150

def initialize (service_name, application_context)

    super

    @output = get_work_directory + "/history.log"
    @output = File.open(@output, "w+")

    linfo { "new() outputting history to #{@output.path}" }
end

Instance Method Details

#output_fileObject

Returns a handle on the output file instance used by this FileHistory.



164
165
166
# File 'lib/openwfe/expool/history.rb', line 164

def output_file
    @output
end

#stopObject



168
169
170
# File 'lib/openwfe/expool/history.rb', line 168

def stop
    @output.close
end