public async Task <IActionResult> ExecuteSync([FromBody] PadExecution request) { var pad = PadFactory.CreateInstance(request.Pad, ExecutionMode.Normal, request.Instances); await pad.Init(); await pad.Execute(pad.Context, request.Instances); var result = new ExecutionResult { PadIdentifier = request.Pad.Identifier, Status = pad.Context.Status, Summary = pad.Context.ExecutionSummary, Result = pad.Context.Result }; using (var padmgr = this.clientFactory.CreateClient("padMgr")) { var histResponse = await padmgr.PostAsJsonAsync <ExecutionResult>($"/api/pad/history?userId={request.UserId}", result); } return(Ok(result)); }
public async Task <IActionResult> Execute([FromBody] PadExecution pad) { await this.eventBus.Publish(pad); return(Ok()); }