parent
1f0020a61c
commit
2476d9be2d
|
@ -93,15 +93,22 @@ protected
|
||||||
#
|
#
|
||||||
def self.job_run_proc(ctx)
|
def self.job_run_proc(ctx)
|
||||||
mod = ctx[0]
|
mod = ctx[0]
|
||||||
|
sid = mod.datastore["SESSION"]
|
||||||
begin
|
begin
|
||||||
mod.setup
|
mod.setup
|
||||||
mod.framework.events.on_module_run(mod)
|
mod.framework.events.on_module_run(mod)
|
||||||
# Grab the session object since we need to fire an event for not
|
# Grab the session object since we need to fire an event for not
|
||||||
# only the normal module_run event that all module types have to
|
# only the normal module_run event that all module types have to
|
||||||
# report, but a specific event for sessions as well.
|
# report, but a specific event for sessions as well.
|
||||||
s = mod.framework.sessions[mod.datastore["SESSION"]]
|
s = mod.framework.sessions.get(sid)
|
||||||
mod.framework.events.on_session_module_run(s, mod)
|
if s
|
||||||
mod.run
|
mod.framework.events.on_session_module_run(s, mod)
|
||||||
|
mod.run
|
||||||
|
else
|
||||||
|
mod.print_error("Invalid session ID: #{sid}")
|
||||||
|
mod.cleanup
|
||||||
|
return
|
||||||
|
end
|
||||||
rescue ::Timeout::Error => e
|
rescue ::Timeout::Error => e
|
||||||
mod.error = e
|
mod.error = e
|
||||||
mod.print_error("Post triggered a timeout exception")
|
mod.print_error("Post triggered a timeout exception")
|
||||||
|
|
Loading…
Reference in New Issue