Compare commits

..

2 Commits

Author SHA1 Message Date
kjh2064 6d9937c590 fix(web): calculate correct Hangfire job StartedAt using TotalDuration metadata
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 16s
Validators (Pushes and Pull Requests) / validate-core (push) Successful in 1m46s
2026-07-12 14:15:46 +09:00
kjh2064 ef6f9c74f6 fix(web): define explicit action endpoint with handler query for operations manual trigger form
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 15s
Validators (Pushes and Pull Requests) / validate-core (push) Successful in 1m45s
2026-07-12 14:10:40 +09:00
2 changed files with 19 additions and 11 deletions
@@ -68,7 +68,7 @@
}
</td>
<td>
<form method="post" asp-page-handler="TriggerJob" class="d-inline">
<form method="post" action="/Admin/Operations?handler=TriggerJob" class="d-inline">
@Html.AntiForgeryToken()
<input type="hidden" name="jobId" value="@job.JobId" />
<button type="submit" class="btn btn-sm btn-success text-white">즉시 실행</button>
@@ -87,18 +87,26 @@ public class IndexModel : PageModel
InactiveJobsCount = TotalJobsCount - ActiveJobsCount;
var succeeded = monitoringApi.SucceededJobs(0, 10)
.Select(kv => new JobExecutionInfo(
kv.Value.Job?.Method.Name ?? kv.Key,
kv.Value.SucceededAt ?? DateTime.UtcNow,
kv.Value.SucceededAt,
true));
.Select(kv => {
var succeededAt = kv.Value.SucceededAt ?? DateTime.UtcNow;
var durationMs = kv.Value.TotalDuration ?? 0;
var startedAt = succeededAt.AddMilliseconds(-durationMs);
return new JobExecutionInfo(
kv.Value.Job?.Method.Name ?? kv.Key,
startedAt,
succeededAt,
true);
});
var failed = monitoringApi.FailedJobs(0, 10)
.Select(kv => new JobExecutionInfo(
kv.Value.Job?.Method.Name ?? kv.Key,
kv.Value.FailedAt ?? DateTime.UtcNow,
kv.Value.FailedAt,
false));
.Select(kv => {
var failedAt = kv.Value.FailedAt ?? DateTime.UtcNow;
return new JobExecutionInfo(
kv.Value.Job?.Method.Name ?? kv.Key,
failedAt,
failedAt,
false);
});
RecentExecutions = succeeded.Concat(failed)
.OrderByDescending(e => e.StartedAt)