This commit is contained in:
sillyguodong 2023-07-25 09:33:32 +08:00
parent 27ea804e21
commit b8454234f8
No known key found for this signature in database
GPG Key ID: 4A0646FA86256DF4

View File

@ -79,7 +79,7 @@ func (p *Poller) fetchTask(ctx context.Context) (*runnerv1.Task, bool) {
reqCtx, cancel := context.WithTimeout(ctx, p.cfg.Runner.FetchTimeout) reqCtx, cancel := context.WithTimeout(ctx, p.cfg.Runner.FetchTimeout)
defer cancel() defer cancel()
// Load the version value that was in the cache when the request was initiated. // Load the version value that was in the cache when the request was sent.
v := p.tasksVersion.Load() v := p.tasksVersion.Load()
resp, err := p.client.FetchTask(reqCtx, connect.NewRequest(&runnerv1.FetchTaskRequest{ resp, err := p.client.FetchTask(reqCtx, connect.NewRequest(&runnerv1.FetchTaskRequest{
TasksVersion: v, TasksVersion: v,