runRevertableTask

Function

Runs the given task and returns a IRevertableTaskResult

Runs the given task and returns a IRevertableTaskResult

  • runRevertableTask(task: function(args: any[]) : Promise<any>, revert: function(args: any[]) : Promise<any>) : Promise<IRevertableTaskResult>

Parameters

Parameter Type Default Notes
task Required function(args: any[]) : Promise<any>

A task method to run

revert Required function(args: any[]) : Promise<any>

A method to revert the task

Returns

Property Type Notes

Function defined in common/src/utils/revertable-tasks.ts:16