mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(cron): use getJobState helper in handlePauseResume
Self-review follow-up: handlePauseResume read job.state directly while the rest of the page goes through getJobState(), which falls back to the enabled flag when state is null/undefined. With the backend normalizer in this PR, state is always populated on the wire, so this has no observable effect today — but using the helper keeps the page consistent and resilient against older Hermes backends that don't run the normalizer.
This commit is contained in:
parent
e572737274
commit
96dc272623
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ export default function CronPage() {
|
|||
|
||||
const handlePauseResume = async (job: CronJob) => {
|
||||
try {
|
||||
const isPaused = job.state === "paused";
|
||||
const isPaused = getJobState(job) === "paused";
|
||||
if (isPaused) {
|
||||
await api.resumeCronJob(job.id);
|
||||
showToast(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue