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

feat(worker): add HasCapability method #73

Merged
merged 1 commit into from May 3, 2024
Merged

Conversation

rickstaa
Copy link
Contributor

This commit adds a HasCapability method to the worker that can be used to check if the worker has enough capacity to take a request. This method will be used to check if an O has enough capability to support a request in https://github.com/livepeer/go-livepeer/tree/ai-video. This will prevent the Gateway from paying for requests send the the O when it has no capacity.

This commit adds a HasCapability method to the worker that can be used to
check if the worker has enough capacity to take a request.
@rickstaa
Copy link
Contributor Author

By design this does not work with external containers (see https://github.com/livepeer/ai-worker/blob/3d355743417abde6bcae6b5b62e03a74138d4968/worker/worker.go). So people can still try to game the system they will suspended if they keep returning insufficient capacity errors.

@rickstaa rickstaa merged commit 5fd6e76 into main May 3, 2024
@rickstaa rickstaa deleted the add_has_capacity_method branch May 3, 2024 21:22
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

Successfully merging this pull request may close these issues.

None yet

1 participant