Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 1fde9d6

Browse files
committed
wip v2 experimentation
1 parent 008e210 commit 1fde9d6

File tree

10 files changed

+560
-404
lines changed

10 files changed

+560
-404
lines changed

hatchet_sdk/runtime/__init__.py

Whitespace-only changes.

hatchet_sdk/runtime/admin.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
# import hatchet_sdk.v2.callable as sdk
3+
# import hatchet_sdk.clients.admin as client
4+
5+
# from hatchet_sdk.contracts.workflows_pb2 import (
6+
# CreateStepRateLimit,
7+
# CreateWorkflowJobOpts,
8+
# CreateWorkflowStepOpts,
9+
# CreateWorkflowVersionOpts,
10+
# DesiredWorkerLabels,
11+
# StickyStrategy,
12+
# WorkflowConcurrencyOpts,
13+
# WorkflowKind,
14+
# )
15+
16+
# async def put_workflow(callable: sdk.HatchetCallable, client: client.AdminClient):
17+
# options = callable._.options
18+
19+
# kind: WorkflowKind = WorkflowKind.DURABLE if options.durable else WorkflowKind.FUNCTION
20+

hatchet_sdk/runtime/registry.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from typing import Dict, List
2+
3+
4+
class ActionRegistry:
5+
6+
_registry: Dict[str, "HatchetCallable"] = dict()
7+
8+
def register(self, callable: "HatchetCallable") -> str:
9+
key = "{namespace}:{name}".format(
10+
namespace=callable._.namespace, name=callable._.name
11+
)
12+
self._registry[key] = callable
13+
return key
14+
15+
def list(self) -> List[str]:
16+
return list(self._registry.keys())
17+
18+
19+
global_registry = ActionRegistry()

0 commit comments

Comments
 (0)