mirror of
https://github.com/docker/compose.git
synced 2025-07-23 05:34:36 +02:00
don't block events loop collecting logs
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
eb0632b1d8
commit
dec608f3cd
@ -96,18 +96,21 @@ func (s *composeService) Logs(
|
|||||||
ID: c.ID,
|
ID: c.ID,
|
||||||
Service: c.Labels[api.ServiceLabel],
|
Service: c.Labels[api.ServiceLabel],
|
||||||
})
|
})
|
||||||
err := s.logContainers(ctx, consumer, c, api.LogOptions{
|
eg.Go(func() error {
|
||||||
Follow: options.Follow,
|
err := s.logContainers(ctx, consumer, c, api.LogOptions{
|
||||||
Since: t.Format(time.RFC3339Nano),
|
Follow: options.Follow,
|
||||||
Until: options.Until,
|
Since: t.Format(time.RFC3339Nano),
|
||||||
Tail: options.Tail,
|
Until: options.Until,
|
||||||
Timestamps: options.Timestamps,
|
Tail: options.Tail,
|
||||||
|
Timestamps: options.Timestamps,
|
||||||
|
})
|
||||||
|
if _, ok := err.(errdefs.ErrNotImplemented); ok {
|
||||||
|
// ignore
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return err
|
||||||
})
|
})
|
||||||
if _, ok := err.(errdefs.ErrNotImplemented); ok {
|
return nil
|
||||||
// ignore
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}, func(c types.Container, t time.Time) error {
|
}, func(c types.Container, t time.Time) error {
|
||||||
printer.HandleEvent(api.ContainerEvent{
|
printer.HandleEvent(api.ContainerEvent{
|
||||||
Type: api.ContainerEventAttach,
|
Type: api.ContainerEventAttach,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user