This commit is contained in:
2018-08-28 23:25:50 +00:00
parent 78ce79fc5c
commit 6374b386d6
11 changed files with 70 additions and 65 deletions

View File

@@ -86,18 +86,20 @@ namespace AyaNova.Api.Controllers
JObject o = JObject.FromObject(new
{
seedLevel = seedLevel
seedLevel = seedLevel
});
OpsJob j = new OpsJob();
j.Name = $"Seed test data (size={size})";
j.JobType = JobType.SeedTestData;
j.Exclusive=true;//don't run other jobs, this will erase the db
j.Exclusive = true;//don't run other jobs, this will erase the db
j.JobInfo = o.ToString();
JobsBiz.AddJob(j, ct);
//Log
//EventLogProcessor.AddEntry(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.TrialSeeder, AyaEvent.Created,size), ct);
//Log
EventLogProcessor.AddEntry(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.TrialSeeder, AyaEvent.Created, size), ct);
ct.SaveChanges();
return Accepted(new { JobId = j.GId });//202 accepted