mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-21 22:33:27 +00:00
Update queue-worker to print body
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
17
cmd/up.go
17
cmd/up.go
@ -49,12 +49,27 @@ func runUp(_ *cobra.Command, _ []string) error {
|
||||
"write_timeout=60s",
|
||||
"upstream_timeout=65s",
|
||||
"faas_nats_address=nats",
|
||||
"faas_nats_port=8222",
|
||||
"faas_nats_port=4222",
|
||||
},
|
||||
Image: "docker.io/openfaas/gateway:0.17.4",
|
||||
Mounts: []pkg.Mount{},
|
||||
Caps: []string{"CAP_NET_RAW"},
|
||||
},
|
||||
pkg.Service{
|
||||
Name: "queue-worker",
|
||||
Env: []string{
|
||||
"faas_nats_address=nats",
|
||||
"faas_nats_port=4222",
|
||||
"gateway_invoke=true",
|
||||
"faas_gateway_address=gateway",
|
||||
"ack_wait=5m5s",
|
||||
"max_inflight=1",
|
||||
"faas_print_body=true",
|
||||
},
|
||||
Image: "docker.io/openfaas/queue-worker:0.8.4",
|
||||
Mounts: []pkg.Mount{},
|
||||
Caps: []string{"CAP_NET_RAW"},
|
||||
},
|
||||
}
|
||||
|
||||
start := time.Now()
|
||||
|
@ -95,13 +95,13 @@ func (s *Supervisor) Start(svcs []Service) error {
|
||||
status, _ := t.Status(ctx)
|
||||
fmt.Println("Status:", status.Status)
|
||||
|
||||
if status.Status == containerd.Running {
|
||||
log.Println("need to kill", svc.Name)
|
||||
err := killTask(ctx, t)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error killing task %s, %s, %s", container.ID(), svc.Name, err)
|
||||
}
|
||||
// if status.Status == containerd.Running {
|
||||
log.Println("need to kill", svc.Name)
|
||||
err := killTask(ctx, t)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error killing task %s, %s, %s", container.ID(), svc.Name, err)
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
err = container.Delete(ctx, containerd.WithSnapshotCleanup)
|
||||
|
Reference in New Issue
Block a user