Skip to content

Commit 0d53a55

Browse files
authored
Updated job completion status for Postman (#3922)
1 parent 1c9ef1d commit 0d53a55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/sources/postman/postman.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, _ .
184184
if err != nil {
185185
return fmt.Errorf("error getting workspace %s: %w", workspaceID, err)
186186
}
187+
s.SetProgressOngoing(fmt.Sprintf("Scanning workspace %s", workspaceID), "")
187188
if err = s.scanWorkspace(ctx, chunksChan, w); err != nil {
188189
return fmt.Errorf("error scanning workspace %s: %w", workspaceID, err)
189190
}
@@ -199,6 +200,7 @@ func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, _ .
199200
if err != nil {
200201
return fmt.Errorf("error getting collection %s: %w", collectionID, err)
201202
}
203+
s.SetProgressOngoing(fmt.Sprintf("Scanning collection %s", collectionID), "")
202204
s.scanCollection(ctx, chunksChan, Metadata{}, collection)
203205
}
204206

@@ -209,12 +211,14 @@ func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, _ .
209211
return fmt.Errorf("error enumerating postman workspaces: %w", err)
210212
}
211213
for _, workspace := range workspaces {
214+
s.SetProgressOngoing(fmt.Sprintf("Scanning workspace %s", workspace.ID), "")
212215
if err = s.scanWorkspace(ctx, chunksChan, workspace); err != nil {
213216
return fmt.Errorf("error scanning workspace %s: %w", workspace.ID, err)
214217
}
215218
}
216219
}
217220

221+
s.SetProgressComplete(1, 1, "Completed scanning workspaces", "")
218222
return nil
219223
}
220224

0 commit comments

Comments
 (0)