This commit is contained in:
@@ -148,7 +148,7 @@ namespace AyaNova.Api.Controllers
|
||||
OpsJob j = new OpsJob();
|
||||
j.Name = "TestJob";
|
||||
j.JobType = JobType.TestJob;
|
||||
await JobsBiz.AddJobAsync(j, ct);
|
||||
await JobsBiz.AddJobAsync(j);
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.ServerJob, AyaEvent.Created, $"{j.JobType} {j.Name}"), ct);
|
||||
return Accepted(new { JobId = j.GId });//202 accepted
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace AyaNova.Api.Controllers
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var res = await Search.GetInfoAsync(ct, UserTranslationIdFromContext.Id(HttpContext.Items),
|
||||
var res = await Search.GetInfoAsync(UserTranslationIdFromContext.Id(HttpContext.Items),
|
||||
UserRolesFromContext.Roles(HttpContext.Items), UserIdFromContext.Id(HttpContext.Items), phrase, max, ayaType, id);
|
||||
|
||||
return Ok(ApiOkResponse.Response(res));
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace AyaNova.Api.Controllers
|
||||
j.SubType = JobSubType.TagAdd;
|
||||
j.Exclusive = false;
|
||||
j.JobInfo = o.ToString();
|
||||
await JobsBiz.AddJobAsync(j, ct);
|
||||
await JobsBiz.AddJobAsync(j);
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.ServerJob, AyaEvent.Created, JobName), ct);
|
||||
return Accepted(new { JobId = j.GId });
|
||||
}
|
||||
@@ -155,7 +155,7 @@ namespace AyaNova.Api.Controllers
|
||||
j.SubType = JobSubType.TagAddAny;
|
||||
j.Exclusive = false;
|
||||
j.JobInfo = o.ToString();
|
||||
await JobsBiz.AddJobAsync(j, ct);
|
||||
await JobsBiz.AddJobAsync(j);
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.ServerJob, AyaEvent.Created, JobName), ct);
|
||||
return Accepted(new { JobId = j.GId });
|
||||
}
|
||||
@@ -187,7 +187,7 @@ namespace AyaNova.Api.Controllers
|
||||
var JobName = $"Bulk operation: Remove tag \"{tag}\" from {ayaType} ({idList.Count} specified)";
|
||||
JObject o = JObject.FromObject(new
|
||||
{
|
||||
idList = idList,
|
||||
idList = idList,
|
||||
tag = tag
|
||||
});
|
||||
|
||||
@@ -198,7 +198,7 @@ namespace AyaNova.Api.Controllers
|
||||
j.SubType = JobSubType.TagRemove;
|
||||
j.Exclusive = false;
|
||||
j.JobInfo = o.ToString();
|
||||
await JobsBiz.AddJobAsync(j, ct);
|
||||
await JobsBiz.AddJobAsync(j);
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.ServerJob, AyaEvent.Created, JobName), ct);
|
||||
return Accepted(new { JobId = j.GId });
|
||||
}
|
||||
@@ -239,7 +239,7 @@ namespace AyaNova.Api.Controllers
|
||||
j.JobType = JobType.BulkCoreBizObjectOperation;
|
||||
j.Exclusive = false;
|
||||
j.JobInfo = o.ToString();
|
||||
await JobsBiz.AddJobAsync(j, ct);
|
||||
await JobsBiz.AddJobAsync(j);
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.ServerJob, AyaEvent.Created, JobName), ct);
|
||||
return Accepted(new { JobId = j.GId });
|
||||
}
|
||||
@@ -287,7 +287,7 @@ namespace AyaNova.Api.Controllers
|
||||
j.SubType = JobSubType.TagReplace;
|
||||
j.Exclusive = false;
|
||||
j.JobInfo = o.ToString();
|
||||
await JobsBiz.AddJobAsync(j, ct);
|
||||
await JobsBiz.AddJobAsync(j);
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.ServerJob, AyaEvent.Created, JobName), ct);
|
||||
return Accepted(new { JobId = j.GId });
|
||||
}
|
||||
@@ -333,7 +333,7 @@ namespace AyaNova.Api.Controllers
|
||||
j.SubType = JobSubType.TagReplaceAny;
|
||||
j.Exclusive = false;
|
||||
j.JobInfo = o.ToString();
|
||||
await JobsBiz.AddJobAsync(j, ct);
|
||||
await JobsBiz.AddJobAsync(j);
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.ServerJob, AyaEvent.Created, JobName), ct);
|
||||
return Accepted(new { JobId = j.GId });
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace AyaNova.Api.Controllers
|
||||
j.JobType = JobType.SeedTestData;
|
||||
j.Exclusive = true;//don't run other jobs, this will erase the db
|
||||
j.JobInfo = o.ToString();
|
||||
await JobsBiz.AddJobAsync(j, ct);
|
||||
await JobsBiz.AddJobAsync(j);
|
||||
|
||||
//Log
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.TrialSeeder, AyaEvent.Created, size), ct);
|
||||
|
||||
Reference in New Issue
Block a user