Skip to content

Commit

Permalink
Updated job completion status for Postman (#3922)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey-tran authored Feb 19, 2025
1 parent 1c9ef1d commit 0d53a55
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/sources/postman/postman.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, _ .
if err != nil {
return fmt.Errorf("error getting workspace %s: %w", workspaceID, err)
}
s.SetProgressOngoing(fmt.Sprintf("Scanning workspace %s", workspaceID), "")
if err = s.scanWorkspace(ctx, chunksChan, w); err != nil {
return fmt.Errorf("error scanning workspace %s: %w", workspaceID, err)
}
Expand All @@ -199,6 +200,7 @@ func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, _ .
if err != nil {
return fmt.Errorf("error getting collection %s: %w", collectionID, err)
}
s.SetProgressOngoing(fmt.Sprintf("Scanning collection %s", collectionID), "")
s.scanCollection(ctx, chunksChan, Metadata{}, collection)
}

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

s.SetProgressComplete(1, 1, "Completed scanning workspaces", "")
return nil
}

Expand Down

0 comments on commit 0d53a55

Please sign in to comment.