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: slot controls #8

Merged
merged 4 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions hatchet_sdk/clients/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
GroupKeyActionEvent,
HeartbeatRequest,
OverridesData,
ReleaseSlotRequest,
StepActionEvent,
WorkerListenRequest,
WorkerRegisterRequest,
Expand Down Expand Up @@ -338,3 +339,10 @@ def put_overrides_data(self, data: OverridesData):
)

return response

def release_slot(self, step_run_id: str):
self.client.ReleaseSlot(
ReleaseSlotRequest(stepRunId=step_run_id),
timeout=DEFAULT_REGISTER_TIMEOUT,
metadata=get_metadata(self.token),
)
18 changes: 18 additions & 0 deletions hatchet_sdk/clients/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from hatchet_sdk.clients.rest.api.healthcheck_api import HealthcheckApi
from hatchet_sdk.clients.rest.api.log_api import LogApi
from hatchet_sdk.clients.rest.api.metadata_api import MetadataApi
from hatchet_sdk.clients.rest.api.slack_api import SlackApi
from hatchet_sdk.clients.rest.api.sns_api import SNSApi
from hatchet_sdk.clients.rest.api.step_run_api import StepRunApi
from hatchet_sdk.clients.rest.api.tenant_api import TenantApi
Expand Down Expand Up @@ -67,6 +68,9 @@
from hatchet_sdk.clients.rest.models.create_sns_integration_request import (
CreateSNSIntegrationRequest,
)
from hatchet_sdk.clients.rest.models.create_tenant_alert_email_group_request import (
CreateTenantAlertEmailGroupRequest,
)
from hatchet_sdk.clients.rest.models.create_tenant_invite_request import (
CreateTenantInviteRequest,
)
Expand Down Expand Up @@ -105,6 +109,7 @@
from hatchet_sdk.clients.rest.models.list_pull_requests_response import (
ListPullRequestsResponse,
)
from hatchet_sdk.clients.rest.models.list_slack_webhooks import ListSlackWebhooks
from hatchet_sdk.clients.rest.models.list_sns_integrations import ListSNSIntegrations
from hatchet_sdk.clients.rest.models.log_line import LogLine
from hatchet_sdk.clients.rest.models.log_line_level import LogLineLevel
Expand All @@ -119,12 +124,22 @@
from hatchet_sdk.clients.rest.models.reject_invite_request import RejectInviteRequest
from hatchet_sdk.clients.rest.models.replay_event_request import ReplayEventRequest
from hatchet_sdk.clients.rest.models.rerun_step_run_request import RerunStepRunRequest
from hatchet_sdk.clients.rest.models.slack_webhook import SlackWebhook
from hatchet_sdk.clients.rest.models.sns_integration import SNSIntegration
from hatchet_sdk.clients.rest.models.step import Step
from hatchet_sdk.clients.rest.models.step_run import StepRun
from hatchet_sdk.clients.rest.models.step_run_diff import StepRunDiff
from hatchet_sdk.clients.rest.models.step_run_status import StepRunStatus
from hatchet_sdk.clients.rest.models.tenant import Tenant
from hatchet_sdk.clients.rest.models.tenant_alert_email_group import (
TenantAlertEmailGroup,
)
from hatchet_sdk.clients.rest.models.tenant_alert_email_group_list import (
TenantAlertEmailGroupList,
)
from hatchet_sdk.clients.rest.models.tenant_alerting_settings import (
TenantAlertingSettings,
)
from hatchet_sdk.clients.rest.models.tenant_invite import TenantInvite
from hatchet_sdk.clients.rest.models.tenant_invite_list import TenantInviteList
from hatchet_sdk.clients.rest.models.tenant_list import TenantList
Expand All @@ -134,6 +149,9 @@
from hatchet_sdk.clients.rest.models.trigger_workflow_run_request import (
TriggerWorkflowRunRequest,
)
from hatchet_sdk.clients.rest.models.update_tenant_alert_email_group_request import (
UpdateTenantAlertEmailGroupRequest,
)
from hatchet_sdk.clients.rest.models.update_tenant_invite_request import (
UpdateTenantInviteRequest,
)
Expand Down
1 change: 1 addition & 0 deletions hatchet_sdk/clients/rest/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from hatchet_sdk.clients.rest.api.healthcheck_api import HealthcheckApi
from hatchet_sdk.clients.rest.api.log_api import LogApi
from hatchet_sdk.clients.rest.api.metadata_api import MetadataApi
from hatchet_sdk.clients.rest.api.slack_api import SlackApi
from hatchet_sdk.clients.rest.api.sns_api import SNSApi
from hatchet_sdk.clients.rest.api.step_run_api import StepRunApi
from hatchet_sdk.clients.rest.api.tenant_api import TenantApi
Expand Down
Loading
Loading