Relay current process output without spool
This commit is contained in:
+3
-8
@@ -66,13 +66,6 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
log.Printf("RUN phase=workspace_seed status=ready workspace=%s", diagnosticValue(cfg.WorkspaceRoot))
|
||||
log.Printf("RUN phase=log_spool status=opening path=%s", diagnosticValue(cfg.SpoolRoot))
|
||||
logSpool, err := spool.NewLogSpool(cfg.SpoolRoot)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "initialize log spool: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
log.Printf("RUN phase=log_spool status=ready path=%s", diagnosticValue(cfg.SpoolRoot))
|
||||
log.Printf("RUN phase=artifact_queue status=opening path=%s", diagnosticValue(cfg.SpoolRoot))
|
||||
artifactQueue, err := spool.NewArtifactQueue(cfg.SpoolRoot)
|
||||
if err != nil {
|
||||
@@ -80,11 +73,13 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
log.Printf("RUN phase=artifact_queue status=ready path=%s", diagnosticValue(cfg.SpoolRoot))
|
||||
liveLogSink := runruntime.NewLiveLogSink(client)
|
||||
defer liveLogSink.Close()
|
||||
log.Printf("RUN phase=worker_init status=starting endpoint=%s", diagnosticValue(cfg.RunEndpointID))
|
||||
worker, err := runruntime.NewWorker(
|
||||
cfg,
|
||||
client,
|
||||
runruntime.WithProcessLogSink(&runruntime.SpoolLogSink{Spool: logSpool}),
|
||||
runruntime.WithProcessLogSink(liveLogSink),
|
||||
runruntime.WithLifecycleArtifactHook(&runruntime.QueueArtifactHook{Queue: artifactQueue}),
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user