fix: Simplify provisionerd job acquire (#158)

This uses a simple channel to detect whether a
job is running or not, and moves all cancels
to be in goroutines.
This commit is contained in:
Kyle Carberry
2022-02-03 19:13:22 -06:00
committed by GitHub
parent 7884b43c78
commit c65850b654
11 changed files with 186 additions and 131 deletions

View File

@ -60,6 +60,7 @@ type querier interface {
UpdateAPIKeyByID(ctx context.Context, arg UpdateAPIKeyByIDParams) error
UpdateProvisionerDaemonByID(ctx context.Context, arg UpdateProvisionerDaemonByIDParams) error
UpdateProvisionerJobByID(ctx context.Context, arg UpdateProvisionerJobByIDParams) error
UpdateProvisionerJobWithCompleteByID(ctx context.Context, arg UpdateProvisionerJobWithCompleteByIDParams) error
UpdateWorkspaceHistoryByID(ctx context.Context, arg UpdateWorkspaceHistoryByIDParams) error
}