Added recording of main process events to persistent storage
This commit is contained in:
@ -49,11 +49,16 @@ function modpol.orgs:call_module(module_slug, initiator, config, result)
|
||||
|
||||
self.processes[index] = new_process
|
||||
self.processes[index]:initiate(result)
|
||||
local msg = "Initiating "..module_slug..
|
||||
" process id "..index.." in org "..self.name
|
||||
|
||||
return index
|
||||
end
|
||||
|
||||
function modpol.orgs:delete_process(id)
|
||||
local msg = "Deleting "..self.processes[id].slug..
|
||||
" process id "..id.." in org "..self.name
|
||||
self:record(msg, self.processes[id].slug)
|
||||
self:wipe_pending_actions(id)
|
||||
self.processes[id] = 'deleted'
|
||||
end
|
||||
@ -97,6 +102,10 @@ function modpol.orgs:interact(process_id, user)
|
||||
local callback = self.pending[user][process_id]
|
||||
if callback then
|
||||
process[callback](process, user)
|
||||
-- record org data
|
||||
local msg = "Updating "..self.processes[process_id].slug..
|
||||
" process id "..process_id.." in org "..self.name
|
||||
self:record(msg, self.processes[process_id].slug)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user