e8f48c6d37
Remove standalone lease-recovery, received-inspection, and result-recovery workers from tenant-api (now handled by scheduler process). Add configurable concurrency to ingest and projection-rebuild workers via MonitoringWorkers runtime config. Extract shared runtime types for worker configuration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
497 B
Go
23 lines
497 B
Go
package app
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
)
|
|
|
|
func decodeMonitoringTaskResultEnvelope(payload []byte) (*monitoringTaskResultEnvelope, error) {
|
|
if len(payload) == 0 {
|
|
return nil, fmt.Errorf("monitoring task result payload is empty")
|
|
}
|
|
|
|
var envelope monitoringTaskResultEnvelope
|
|
if err := json.Unmarshal(payload, &envelope); err != nil {
|
|
return nil, err
|
|
}
|
|
if envelope.TaskID <= 0 {
|
|
return nil, fmt.Errorf("monitoring task result payload missing task_id")
|
|
}
|
|
|
|
return &envelope, nil
|
|
}
|