minor improvement
This commit is contained in:
@@ -26,9 +26,12 @@ public class JobsHandler(IApiServer server)
|
||||
if (server.Jobs.Jobs.FirstOrDefault(n => n.Name == name) is not Job job)
|
||||
return ApiResult.BadRequest();
|
||||
|
||||
var now = DateTime.Now;
|
||||
job.Execute(new(server.Jobs));
|
||||
job.LastExecution = now;
|
||||
var context = new JobContext(server.Jobs);
|
||||
job.LastExecution = DateTime.Now;
|
||||
job.Execute(context);
|
||||
|
||||
if (context.HasError)
|
||||
return ApiResult.InternalServerError();
|
||||
|
||||
return ApiResult.Ok();
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>2.9.1</Version>
|
||||
<Version>2.9.2</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user