writeWatchSyncMessage prints out a message about the sync for the changed paths.
(log api.LogConsumer, serviceName string, pathMappings []*sync.PathMapping)
| 696 | |
| 697 | // writeWatchSyncMessage prints out a message about the sync for the changed paths. |
| 698 | func writeWatchSyncMessage(log api.LogConsumer, serviceName string, pathMappings []*sync.PathMapping) { |
| 699 | if logrus.IsLevelEnabled(logrus.DebugLevel) { |
| 700 | hostPathsToSync := make([]string, len(pathMappings)) |
| 701 | for i := range pathMappings { |
| 702 | hostPathsToSync[i] = pathMappings[i].HostPath |
| 703 | } |
| 704 | log.Log( |
| 705 | api.WatchLogger, |
| 706 | fmt.Sprintf( |
| 707 | "Syncing service %q after changes were detected: %s", |
| 708 | serviceName, |
| 709 | strings.Join(hostPathsToSync, ", "), |
| 710 | ), |
| 711 | ) |
| 712 | } else { |
| 713 | log.Log( |
| 714 | api.WatchLogger, |
| 715 | fmt.Sprintf("Syncing service %q after %d changes were detected", serviceName, len(pathMappings)), |
| 716 | ) |
| 717 | } |
| 718 | } |
| 719 | |
| 720 | func (s *composeService) pruneDanglingImagesOnRebuild(ctx context.Context, projectName string, imageNameToIdMap map[string]string) { |
| 721 | images, err := s.apiClient().ImageList(ctx, client.ImageListOptions{ |