Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetJobsAsync(PipelineJobQuery query) appears not to be async #656

Open
jhueppauff opened this issue Apr 4, 2024 · 1 comment
Open

GetJobsAsync(PipelineJobQuery query) appears not to be async #656

jhueppauff opened this issue Apr 4, 2024 · 1 comment

Comments

@jhueppauff
Copy link

Hi,

I came across the method GetJobsAsync() in the PipelineClient which from the naming seems to be async, but the implementation doesn't really look like it supports async operations?

image

https://github.com/ubisoft/NGitLab/blob/main/NGitLab.Mock/Clients/PipelineClient.cs#L273

@louis-z
Copy link
Member

louis-z commented Dec 20, 2024

Sorry for the late reply...

The name may indeed be a bit misleading. The method returns a GitLabCollectionResponse<Job> which, although it cannot be awaited, can be enumerated asynchronously:

var jobs = pipelineClient.GetJobsAsync(pipelineJobQuery);
await foreach (var job in jobs)
{
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants