_ aggiunto gestione mimetype coinfigurabile
- fix AppUri base
This commit is contained in:
Samuele Locatelli
2024-10-29 17:21:50 +01:00
parent d1f694da1b
commit a66c0fdadf
9 changed files with 63 additions and 12 deletions
+4 -1
View File
@@ -3,6 +3,7 @@ using Microsoft.Extensions.Options;
using MP.TaskMan.Controllers;
using MP.TaskMan.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NLog;
using StackExchange.Redis;
using System;
@@ -128,13 +129,15 @@ namespace MP.TaskMan.Services
{
var callResp = await RCallService.CallRestGet(TaskRec.Command, TaskRec.Args);
DateTime dtEnd = DateTime.Now;
string formattedJson = JValue.Parse(callResp.Content).ToString(Formatting.Indented);
TaskExecModel tExeMod = new TaskExecModel()
{
DtEnd = dtEnd,
DtStart = dtStart,
IsError = callResp.StatusCode != System.Net.HttpStatusCode.OK,
TaskId = TaskRec.TaskId,
Result = $"{callResp.Content}".Replace("\"", ""),
// deserializzazione come json indentato?!?
Result = formattedJson// $"{callResp.Content}".Replace("\"", ""),
};
// salvo su DB
answ = MLController.TaskExecSaveExecuted(TaskRec.TaskId, SchedNext, tExeMod);