This commit is contained in:
@@ -259,7 +259,7 @@ namespace AyaNova.Api.Controllers
|
||||
j.JobType = JobType.ImportV7Data;
|
||||
//j.O wnerId = UserIdFromContext.Id(HttpContext.Items);
|
||||
j.JobInfo = jobInfo.ToString();
|
||||
JobsBiz.AddJob(j, ct);
|
||||
JobsBiz.AddJobAsync(j, ct);
|
||||
return Accepted(new { JobId = j.GId });//202 accepted
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace AyaNova.Api.Controllers
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
}
|
||||
|
||||
if (!AyaNova.Util.DbUtil.DBIsEmpty(ct, log))
|
||||
if (!AyaNova.Util.DbUtil.DBIsEmptyAsync(ct, log))
|
||||
{
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, "Only an empty AyaNova database can request a trial key. Erase the database to proceed with a new trial."));
|
||||
}
|
||||
|
||||
@@ -101,7 +101,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();
|
||||
JobsBiz.AddJob(j, ct);
|
||||
JobsBiz.AddJobAsync(j, ct);
|
||||
|
||||
//Log
|
||||
EventLogProcessor.LogEventToDatabaseAsync(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.TrialSeeder, AyaEvent.Created, size), ct);
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace AyaNova.Api.Controllers
|
||||
OpsJob j = new OpsJob();
|
||||
j.Name = "TestWidgetJob";
|
||||
j.JobType = JobType.TestWidgetJob;
|
||||
JobsBiz.AddJob(j, ct);
|
||||
JobsBiz.AddJobAsync(j, ct);
|
||||
return Accepted(new { JobId = j.GId });//202 accepted
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user