This commit is contained in:
vet
2026-05-28 00:16:19 +08:00
commit 52446ccf3f
54 changed files with 4617 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package jobdef
import "context"
type SampleHandler struct{}
func (SampleHandler) Key() string {
return "sample-handler"
}
func (SampleHandler) Name() string {
return "Sample Handler"
}
func (SampleHandler) Description() string {
return "Writes a sample startup log for scheduler plumbing."
}
func (SampleHandler) Run(ctx context.Context, runtime Runtime, req ExecuteRequest) error {
req.LogCollector.Appendf("sample handler executed: jobID=%s executionID=%s triggerType=%s", req.JobID, req.ExecutionID, req.TriggerType)
runtime.Logger.Info(
"sample handler executed",
"jobID",
req.JobID,
"executionID",
req.ExecutionID,
"triggerType",
req.TriggerType,
)
return nil
}