job need bool field "isprocess" #22
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_proc#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
once and when exit 0 its ok
we should have this bookean and hero_proc needs to be adjusted like this
also all UI
this is a big change plan carefully
Check all result codes
fix openrpc spec
fix UI
fix client cli
when we run something ling term it needs to be active the hero_proc can check for that, if its nto running then its in erroro and should reflect as such
Implementation Spec for Issue #22 —
is_processBoolean FieldObjective
Add an
is_processboolean field to jobs that distinguishes between one-shot jobs (run once, exit 0 = success) and long-running process jobs (should stay running; if not running, it is an error).Requirements
is_process: boolfield toJobstruct (default:false)is_processtoJobSummaryfor list viewsis_processtoActionSpecso it can be set at the action levelFailed--processflag tojob createFiles to Modify
crates/hero_proc_lib/src/db/jobs/model.rscrates/hero_proc_lib/src/db/actions/model.rscrates/hero_proc_server/openrpc.jsoncrates/hero_proc_server/openrpc.client.generated.rscrates/hero_proc_server/src/supervisor/executor.rscrates/hero_proc_server/src/supervisor/mod.rscrates/hero_proc_server/src/rpc/job.rscrates/hero_proc_server/src/rpc/service.rscrates/hero_proc_ui/static/js/dashboard.jscrates/hero_proc_ui/templates/index.htmlcrates/hero_proc/src/cli/args.rscrates/hero_proc/src/cli/commands.rsImplementation Plan (10 Steps)
Step 1: Add
is_processto ActionSpecactions/model.rsStep 2: Add
is_processto Job struct + SQLite persistencejobs/model.rsStep 3: Update supervisor executor for process job semantics
supervisor/executor.rsStep 4: Add liveness check in supervisor poll loop
supervisor/mod.rsStep 5: Update RPC handlers
rpc/job.rs,rpc/service.rsStep 6: Update OpenRPC specification
openrpc.jsonStep 7: Regenerate client code
Step 8: Update CLI
cli/args.rs,cli/commands.rsStep 9: Update UI
dashboard.js,index.htmlStep 10: Add tests
Acceptance Criteria
Jobstruct hasis_process: booldefaulting tofalseJobSummaryandActionSpecincludeis_processFailed--processflag worksNotes
is_process=falseopenrpc_client!macroImplementation Complete
Changes Made
Core Model (
hero_proc_lib)is_process: boolfield toJob,JobSummary, andActionSpecstructsis_process INTEGER NOT NULL DEFAULT 0column + migrationSupervisor (
hero_proc_server)Failed("process exited unexpectedly") instead ofSucceededcheck_process_liveness()runs every tick — detects dead process jobs and marks themFailedrecover_running_jobs()uses descriptive error for process jobs on restartRPC Handlers
job.create: Propagatesis_processfrom ActionSpec to Jobjob.retry: Preservesis_processfrom original jobservice.start/service.start_all: Propagatesis_processfrom action specOpenRPC Spec
is_processboolean toJob,JobSummary, andActionSpecschemasCLI
--processflag tojob createandadd jobcommandsUI
process(blue) /oneshot(gray) badgesTest Results
is_process=falseImplementation committed:
8dd033cBrowse:
8dd033c