chopflow 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.4
2
+ Name: chopflow
3
+ Version: 0.1.0
4
+ Summary: Python client and worker SDK for ChopFlow, a durable distributed task queue.
5
+ Author: Ricardo Leal
6
+ License: Apache-2.0
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: grpcio>=1.62
10
+ Requires-Dist: protobuf>=4.25
11
+ Provides-Extra: dev
12
+ Requires-Dist: grpcio-tools>=1.62; extra == "dev"
13
+ Requires-Dist: pytest>=7; extra == "dev"
14
+ Requires-Dist: pytest-cov>=4; extra == "dev"
15
+ Requires-Dist: pytest-timeout>=2; extra == "dev"
16
+ Requires-Dist: ruff>=0.6; extra == "dev"
17
+
18
+ # ChopFlow Python Client
19
+
20
+ A Python worker + producer SDK for [ChopFlow](../../README.md), the distributed task
21
+ queue in Rust. The broker and all execution logic live in Rust; this SDK lets you
22
+ **define and run task handlers in Python** and **enqueue tasks from Python**, speaking
23
+ gRPC to the broker over the contract in [`broker/proto/chopflow.proto`](../../broker/proto/chopflow.proto).
24
+
25
+ > **Build status:** Verified — `pytest` passes (Python 3.12 + grpcio 1.83) and the
26
+ > examples round-trip end-to-end against the Rust broker (Python producer enqueues an
27
+ > echo task → Python worker acks → `AsyncResult.get()` returns `COMPLETED`).
28
+
29
+ ## Requirements
30
+
31
+ - **Python 3.10+**
32
+ - The Rust broker binary (`chopflow_broker`) running somewhere reachable. Build it with
33
+ `cargo build -p chopflow_broker` from the repo root.
34
+
35
+ ## Install
36
+
37
+ The SDK is not yet published to PyPI; install it editable from source:
38
+
39
+ ```bash
40
+ cd clients/python
41
+ python -m venv .venv && source .venv/bin/activate
42
+ pip install -e ".[dev]"
43
+ ```
44
+
45
+ The generated gRPC stubs (`src/chopflow/_generated/`) are committed, so **no `protoc`
46
+ toolchain is required** to install or use the SDK. Regenerate them only when the proto
47
+ changes:
48
+
49
+ ```bash
50
+ python generate.py # reads ../../broker/proto/chopflow.proto
51
+ ```
52
+
53
+ ## Usage
54
+
55
+ ### Worker — define and run handlers in Python
56
+
57
+ ```python
58
+ from chopflow import ChopFlowWorker, task
59
+
60
+
61
+ @task("resize_image")
62
+ def resize(payload):
63
+ # ...your logic; return something JSON-serializable...
64
+ return {"status": "ok", "resized": payload}
65
+
66
+
67
+ worker = (
68
+ ChopFlowWorker.builder()
69
+ .broker("localhost:8000")
70
+ .tags("image")
71
+ .resources("cpu", 2)
72
+ .build()
73
+ )
74
+ # `resize_image` was registered via the @task decorator above.
75
+ worker.register("ping", lambda p: {"pong": True}) # or register callables directly
76
+ worker.start_and_await() # blocks until Ctrl+C
77
+ ```
78
+
79
+ The worker registers with the broker, sends heartbeats, polls `FetchTasks`, executes
80
+ the matching handler, and acknowledges each task. A handler that raises is acked as a
81
+ failure and the broker applies its retry/dead-letter policy. Tasks with no registered
82
+ handler fall back to the worker's `default` handler (override via
83
+ `worker.register_default(...)`).
84
+
85
+ ### Producer — enqueue tasks and await results
86
+
87
+ ```python
88
+ from chopflow import ChopFlowClient
89
+
90
+ with ChopFlowClient.connect("localhost:8000") as client:
91
+ result = (
92
+ client.enqueue("resize_image")
93
+ .payload({"path": "/img/a.png", "w": 128})
94
+ .tags("image")
95
+ .max_retries(2)
96
+ .priority(5) # higher = claimed before lower (default 0)
97
+ .enqueue()
98
+ )
99
+ task = result.get(timeout=60) # blocks until terminal
100
+ print(task.status_name, task.result)
101
+ ```
102
+
103
+ `AsyncResult.get()` polls `GetTaskStatus` until the task reaches a terminal state
104
+ (`COMPLETED`, `FAILED`, `DEADLETTERED`, `CANCELLED`). By default it raises
105
+ `TaskFailedError` if the task did not complete; pass `raise_on_failure=False` to get
106
+ the terminal `Task` back instead. It raises `TaskTimeoutError` if the deadline elapses.
107
+
108
+ ### Schedules
109
+
110
+ ```python
111
+ from chopflow import ChopFlowClient
112
+ from chopflow.models import OverlapPolicy
113
+
114
+ with ChopFlowClient.connect("localhost:8000") as client:
115
+ sid = client.create_cron_schedule(
116
+ "nightly", "build", "0 9 * * *", tags=["ci"], overlap=OverlapPolicy.OVERLAP_SKIP
117
+ )
118
+ print(client.list_schedules())
119
+ client.delete_schedule(sid)
120
+ ```
121
+
122
+ ## Examples
123
+
124
+ - `examples/producer.py` — enqueue an echo task and print the result.
125
+ - `examples/echo_worker.py` — register an `echo` handler and run until Ctrl+C.
126
+
127
+ ## Tests
128
+
129
+ ```bash
130
+ cd clients/python
131
+ pip install -e ".[dev]"
132
+ pytest # builds the broker once, then runs 14 integration tests
133
+ ```
134
+
135
+ The test suite builds the Rust broker on an ephemeral port with in-memory storage and
136
+ exercises the full SDK: enqueue/get, polling, cancellation, failure dead-lettering,
137
+ schedule CRUD, and worker handler dispatch.
@@ -0,0 +1,120 @@
1
+ # ChopFlow Python Client
2
+
3
+ A Python worker + producer SDK for [ChopFlow](../../README.md), the distributed task
4
+ queue in Rust. The broker and all execution logic live in Rust; this SDK lets you
5
+ **define and run task handlers in Python** and **enqueue tasks from Python**, speaking
6
+ gRPC to the broker over the contract in [`broker/proto/chopflow.proto`](../../broker/proto/chopflow.proto).
7
+
8
+ > **Build status:** Verified — `pytest` passes (Python 3.12 + grpcio 1.83) and the
9
+ > examples round-trip end-to-end against the Rust broker (Python producer enqueues an
10
+ > echo task → Python worker acks → `AsyncResult.get()` returns `COMPLETED`).
11
+
12
+ ## Requirements
13
+
14
+ - **Python 3.10+**
15
+ - The Rust broker binary (`chopflow_broker`) running somewhere reachable. Build it with
16
+ `cargo build -p chopflow_broker` from the repo root.
17
+
18
+ ## Install
19
+
20
+ The SDK is not yet published to PyPI; install it editable from source:
21
+
22
+ ```bash
23
+ cd clients/python
24
+ python -m venv .venv && source .venv/bin/activate
25
+ pip install -e ".[dev]"
26
+ ```
27
+
28
+ The generated gRPC stubs (`src/chopflow/_generated/`) are committed, so **no `protoc`
29
+ toolchain is required** to install or use the SDK. Regenerate them only when the proto
30
+ changes:
31
+
32
+ ```bash
33
+ python generate.py # reads ../../broker/proto/chopflow.proto
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ ### Worker — define and run handlers in Python
39
+
40
+ ```python
41
+ from chopflow import ChopFlowWorker, task
42
+
43
+
44
+ @task("resize_image")
45
+ def resize(payload):
46
+ # ...your logic; return something JSON-serializable...
47
+ return {"status": "ok", "resized": payload}
48
+
49
+
50
+ worker = (
51
+ ChopFlowWorker.builder()
52
+ .broker("localhost:8000")
53
+ .tags("image")
54
+ .resources("cpu", 2)
55
+ .build()
56
+ )
57
+ # `resize_image` was registered via the @task decorator above.
58
+ worker.register("ping", lambda p: {"pong": True}) # or register callables directly
59
+ worker.start_and_await() # blocks until Ctrl+C
60
+ ```
61
+
62
+ The worker registers with the broker, sends heartbeats, polls `FetchTasks`, executes
63
+ the matching handler, and acknowledges each task. A handler that raises is acked as a
64
+ failure and the broker applies its retry/dead-letter policy. Tasks with no registered
65
+ handler fall back to the worker's `default` handler (override via
66
+ `worker.register_default(...)`).
67
+
68
+ ### Producer — enqueue tasks and await results
69
+
70
+ ```python
71
+ from chopflow import ChopFlowClient
72
+
73
+ with ChopFlowClient.connect("localhost:8000") as client:
74
+ result = (
75
+ client.enqueue("resize_image")
76
+ .payload({"path": "/img/a.png", "w": 128})
77
+ .tags("image")
78
+ .max_retries(2)
79
+ .priority(5) # higher = claimed before lower (default 0)
80
+ .enqueue()
81
+ )
82
+ task = result.get(timeout=60) # blocks until terminal
83
+ print(task.status_name, task.result)
84
+ ```
85
+
86
+ `AsyncResult.get()` polls `GetTaskStatus` until the task reaches a terminal state
87
+ (`COMPLETED`, `FAILED`, `DEADLETTERED`, `CANCELLED`). By default it raises
88
+ `TaskFailedError` if the task did not complete; pass `raise_on_failure=False` to get
89
+ the terminal `Task` back instead. It raises `TaskTimeoutError` if the deadline elapses.
90
+
91
+ ### Schedules
92
+
93
+ ```python
94
+ from chopflow import ChopFlowClient
95
+ from chopflow.models import OverlapPolicy
96
+
97
+ with ChopFlowClient.connect("localhost:8000") as client:
98
+ sid = client.create_cron_schedule(
99
+ "nightly", "build", "0 9 * * *", tags=["ci"], overlap=OverlapPolicy.OVERLAP_SKIP
100
+ )
101
+ print(client.list_schedules())
102
+ client.delete_schedule(sid)
103
+ ```
104
+
105
+ ## Examples
106
+
107
+ - `examples/producer.py` — enqueue an echo task and print the result.
108
+ - `examples/echo_worker.py` — register an `echo` handler and run until Ctrl+C.
109
+
110
+ ## Tests
111
+
112
+ ```bash
113
+ cd clients/python
114
+ pip install -e ".[dev]"
115
+ pytest # builds the broker once, then runs 14 integration tests
116
+ ```
117
+
118
+ The test suite builds the Rust broker on an ephemeral port with in-memory storage and
119
+ exercises the full SDK: enqueue/get, polling, cancellation, failure dead-lettering,
120
+ schedule CRUD, and worker handler dispatch.
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "chopflow"
7
+ version = "0.1.0"
8
+ description = "Python client and worker SDK for ChopFlow, a durable distributed task queue."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "Apache-2.0" }
12
+ authors = [{ name = "Ricardo Leal" }]
13
+ dependencies = [
14
+ "grpcio>=1.62",
15
+ "protobuf>=4.25",
16
+ ]
17
+
18
+ [project.optional-dependencies]
19
+ dev = [
20
+ "grpcio-tools>=1.62",
21
+ "pytest>=7",
22
+ "pytest-cov>=4",
23
+ "pytest-timeout>=2",
24
+ "ruff>=0.6",
25
+ ]
26
+
27
+ [tool.setuptools.packages.find]
28
+ where = ["src"]
29
+
30
+ [tool.pytest.ini_options]
31
+ testpaths = ["tests"]
32
+ addopts = "-ra"
33
+
34
+ [tool.ruff]
35
+ line-length = 88
36
+ target-version = "py39"
37
+ extend-exclude = ["src/chopflow/_generated"]
38
+
39
+ [tool.ruff.lint]
40
+ # NOTE: `UP` (pyupgrade) is intentionally omitted — it rewrites type annotations
41
+ # to PEP 604 (`X | None`) and PEP 585 (`dict[str, int]`) forms that are unsafe
42
+ # under the declared `requires-python = ">=3.9"` without a `from __future__
43
+ # import annotations` pass. Enable it as a dedicated modernization task.
44
+ select = ["E", "F", "I", "B", "SIM"]
45
+
46
+ [tool.coverage.run]
47
+ source = ["chopflow"]
48
+ branch = true
49
+ omit = ["src/chopflow/_generated/*"]
50
+
51
+ [tool.coverage.report]
52
+ show_missing = true
53
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,35 @@
1
+ """ChopFlow Python SDK.
2
+
3
+ A producer client and worker SDK for ChopFlow, a durable distributed task
4
+ queue with a Rust core. Speaks gRPC to the broker.
5
+
6
+ Quickstart::
7
+
8
+ from chopflow import ChopFlowClient
9
+
10
+ with ChopFlowClient.connect("localhost:8000") as client:
11
+ result = (
12
+ client.enqueue("echo")
13
+ .payload({"hello": "world"})
14
+ .tags("default")
15
+ .enqueue()
16
+ )
17
+ task = result.get(timeout=30)
18
+ print(task.status, task.result)
19
+ """
20
+
21
+ from .client import AsyncResult, ChopFlowClient, QueueStats, Task
22
+ from .errors import ChopFlowError
23
+ from .worker import ChopFlowWorker, task
24
+
25
+ __all__ = [
26
+ "AsyncResult",
27
+ "ChopFlowClient",
28
+ "ChopFlowError",
29
+ "ChopFlowWorker",
30
+ "QueueStats",
31
+ "Task",
32
+ "task",
33
+ ]
34
+
35
+ __version__ = "0.1.0"
@@ -0,0 +1,2 @@
1
+ """Generated ChopFlow gRPC stubs. Regenerate via `python generate.py`.
2
+ """
@@ -0,0 +1,129 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: chopflow.proto
5
+ # Protobuf Python Version: 7.35.1
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 7,
15
+ 35,
16
+ 1,
17
+ '',
18
+ 'chopflow.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
26
+ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
27
+
28
+
29
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x63hopflow.proto\x12\x08\x63hopflow\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\"\x85\x03\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07payload\x18\x03 \x01(\t\x12\x0c\n\x04tags\x18\x04 \x03(\t\x12\x30\n\x0c\x65nqueue_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x03\x65ta\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0bretry_count\x18\x07 \x01(\r\x12\x13\n\x0bmax_retries\x18\x08 \x01(\r\x12$\n\x06status\x18\t \x01(\x0e\x32\x14.chopflow.TaskStatus\x12\x30\n\tresources\x18\n \x03(\x0b\x32\x1d.chopflow.Task.ResourcesEntry\x12\x0e\n\x06result\x18\x0b \x01(\t\x12\x13\n\x0bschedule_id\x18\x0c \x01(\t\x12\x10\n\x08priority\x18\r \x01(\x05\x1a\x30\n\x0eResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\xb2\x01\n\x06Worker\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\x31\n\tresources\x18\x04 \x01(\x0b\x32\x1e.chopflow.ResourceAvailability\x12\x16\n\x0e\x61ssigned_tasks\x18\x05 \x03(\t\x12\x32\n\x0elast_heartbeat\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xf2\x01\n\x14ResourceAvailability\x12@\n\tavailable\x18\x01 \x03(\x0b\x32-.chopflow.ResourceAvailability.AvailableEntry\x12\x38\n\x05total\x18\x02 \x03(\x0b\x32).chopflow.ResourceAvailability.TotalEntry\x1a\x30\n\x0e\x41vailableEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\x1a,\n\nTotalEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"\x83\x02\n\x12\x45nqueueTaskRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\'\n\x03\x65ta\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0bmax_retries\x18\x05 \x01(\r\x12>\n\tresources\x18\x06 \x03(\x0b\x32+.chopflow.EnqueueTaskRequest.ResourcesEntry\x12\x10\n\x08priority\x18\x07 \x01(\x05\x1a\x30\n\x0eResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"&\n\x13\x45nqueueTaskResponse\x12\x0f\n\x07task_id\x18\x01 \x01(\t\"\'\n\x14GetTaskStatusRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\"5\n\x15GetTaskStatusResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.chopflow.Task\"$\n\x11\x43\x61ncelTaskRequest\x12\x0f\n\x07task_id\x18\x01 \x01(\t\"%\n\x12\x43\x61ncelTaskResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"\xab\x01\n\x15RegisterWorkerRequest\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x0c\n\x04tags\x18\x02 \x03(\t\x12\x41\n\tresources\x18\x03 \x03(\x0b\x32..chopflow.RegisterWorkerRequest.ResourcesEntry\x1a\x30\n\x0eResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"+\n\x16RegisterWorkerResponse\x12\x11\n\tworker_id\x18\x01 \x01(\t\"^\n\x16WorkerHeartbeatRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x31\n\tresources\x18\x02 \x01(\x0b\x32\x1e.chopflow.ResourceAvailability\"*\n\x17WorkerHeartbeatResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"]\n\x16\x41\x63knowledgeTaskRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x0f\n\x07task_id\x18\x02 \x01(\t\x12\x0f\n\x07success\x18\x03 \x01(\x08\x12\x0e\n\x06result\x18\x04 \x01(\t\"*\n\x17\x41\x63knowledgeTaskResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\"9\n\x11\x46\x65tchTasksRequest\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x11\n\tmax_tasks\x18\x02 \x01(\r\"3\n\x12\x46\x65tchTasksResponse\x12\x1d\n\x05tasks\x18\x01 \x03(\x0b\x32\x0e.chopflow.Task\"\x16\n\x14GetQueueStatsRequest\"\x8e\x01\n\x15GetQueueStatsResponse\x12\x14\n\x0cqueue_length\x18\x01 \x01(\r\x12\x18\n\x10tasks_processing\x18\x02 \x01(\r\x12\x17\n\x0ftasks_completed\x18\x03 \x01(\r\x12\x14\n\x0ctasks_failed\x18\x04 \x01(\r\x12\x16\n\x0e\x61\x63tive_workers\x18\x05 \x01(\r\"^\n\x10ListTasksRequest\x12\r\n\x05limit\x18\x01 \x01(\r\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12+\n\rfilter_status\x18\x03 \x03(\x0e\x32\x14.chopflow.TaskStatus\"G\n\x11ListTasksResponse\x12\x1d\n\x05tasks\x18\x01 \x03(\x0b\x32\x0e.chopflow.Task\x12\x13\n\x0btotal_count\x18\x02 \x01(\r\"8\n\x13ListWorkersResponse\x12!\n\x07workers\x18\x01 \x03(\x0b\x32\x10.chopflow.Worker\"\xce\x01\n\x0cTaskTemplate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07payload\x18\x02 \x01(\t\x12\x0c\n\x04tags\x18\x03 \x03(\t\x12\x38\n\tresources\x18\x04 \x03(\x0b\x32%.chopflow.TaskTemplate.ResourcesEntry\x12\x13\n\x0bmax_retries\x18\x05 \x01(\r\x12\x10\n\x08priority\x18\x06 \x01(\x05\x1a\x30\n\x0eResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\"Q\n\x0cScheduleKind\x12\x0e\n\x04\x63ron\x18\x01 \x01(\tH\x00\x12)\n\x03\x65ta\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x06\n\x04kind\"\xca\x02\n\x08Schedule\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12-\n\rtask_template\x18\x03 \x01(\x0b\x32\x16.chopflow.TaskTemplate\x12$\n\x04kind\x18\x04 \x01(\x0b\x32\x16.chopflow.ScheduleKind\x12/\n\x0eoverlap_policy\x18\x05 \x01(\x0e\x32\x17.chopflow.OverlapPolicy\x12\x0f\n\x07\x65nabled\x18\x06 \x01(\x08\x12.\n\nlast_fired\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12-\n\tnext_fire\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"=\n\x15\x43reateScheduleRequest\x12$\n\x08schedule\x18\x01 \x01(\x0b\x32\x12.chopflow.Schedule\"-\n\x16\x43reateScheduleResponse\x12\x13\n\x0bschedule_id\x18\x01 \x01(\t\"\x16\n\x14ListSchedulesRequest\">\n\x15ListSchedulesResponse\x12%\n\tschedules\x18\x01 \x03(\x0b\x32\x12.chopflow.Schedule\"#\n\x15\x44\x65leteScheduleRequest\x12\n\n\x02id\x18\x01 \x01(\t\")\n\x16\x44\x65leteScheduleResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08*n\n\nTaskStatus\x12\x0b\n\x07\x43REATED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\r\n\tCOMPLETED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x10\n\x0c\x44\x45\x41\x44LETTERED\x10\x05\x12\r\n\tCANCELLED\x10\x06*J\n\rOverlapPolicy\x12\x10\n\x0cOVERLAP_SKIP\x10\x00\x12\x14\n\x10OVERLAP_COALESCE\x10\x01\x12\x11\n\rOVERLAP_ALLOW\x10\x02\x32\x9f\x08\n\x0e\x43hopFlowBroker\x12J\n\x0b\x45nqueueTask\x12\x1c.chopflow.EnqueueTaskRequest\x1a\x1d.chopflow.EnqueueTaskResponse\x12P\n\rGetTaskStatus\x12\x1e.chopflow.GetTaskStatusRequest\x1a\x1f.chopflow.GetTaskStatusResponse\x12G\n\nCancelTask\x12\x1b.chopflow.CancelTaskRequest\x1a\x1c.chopflow.CancelTaskResponse\x12S\n\x0eRegisterWorker\x12\x1f.chopflow.RegisterWorkerRequest\x1a .chopflow.RegisterWorkerResponse\x12V\n\x0fWorkerHeartbeat\x12 .chopflow.WorkerHeartbeatRequest\x1a!.chopflow.WorkerHeartbeatResponse\x12V\n\x0f\x41\x63knowledgeTask\x12 .chopflow.AcknowledgeTaskRequest\x1a!.chopflow.AcknowledgeTaskResponse\x12G\n\nFetchTasks\x12\x1b.chopflow.FetchTasksRequest\x1a\x1c.chopflow.FetchTasksResponse\x12P\n\rGetQueueStats\x12\x1e.chopflow.GetQueueStatsRequest\x1a\x1f.chopflow.GetQueueStatsResponse\x12\x44\n\tListTasks\x12\x1a.chopflow.ListTasksRequest\x1a\x1b.chopflow.ListTasksResponse\x12\x44\n\x0bListWorkers\x12\x16.google.protobuf.Empty\x1a\x1d.chopflow.ListWorkersResponse\x12S\n\x0e\x43reateSchedule\x12\x1f.chopflow.CreateScheduleRequest\x1a .chopflow.CreateScheduleResponse\x12P\n\rListSchedules\x12\x1e.chopflow.ListSchedulesRequest\x1a\x1f.chopflow.ListSchedulesResponse\x12S\n\x0e\x44\x65leteSchedule\x12\x1f.chopflow.DeleteScheduleRequest\x1a .chopflow.DeleteScheduleResponseB2\n\x1f\x64\x65v.ricardoleal20.chopflow.grpcB\rChopFlowProtoP\x01\x62\x06proto3')
30
+
31
+ _globals = globals()
32
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
33
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'chopflow_pb2', _globals)
34
+ if not _descriptor._USE_C_DESCRIPTORS:
35
+ _globals['DESCRIPTOR']._loaded_options = None
36
+ _globals['DESCRIPTOR']._serialized_options = b'\n\037dev.ricardoleal20.chopflow.grpcB\rChopFlowProtoP\001'
37
+ _globals['_TASK_RESOURCESENTRY']._loaded_options = None
38
+ _globals['_TASK_RESOURCESENTRY']._serialized_options = b'8\001'
39
+ _globals['_RESOURCEAVAILABILITY_AVAILABLEENTRY']._loaded_options = None
40
+ _globals['_RESOURCEAVAILABILITY_AVAILABLEENTRY']._serialized_options = b'8\001'
41
+ _globals['_RESOURCEAVAILABILITY_TOTALENTRY']._loaded_options = None
42
+ _globals['_RESOURCEAVAILABILITY_TOTALENTRY']._serialized_options = b'8\001'
43
+ _globals['_ENQUEUETASKREQUEST_RESOURCESENTRY']._loaded_options = None
44
+ _globals['_ENQUEUETASKREQUEST_RESOURCESENTRY']._serialized_options = b'8\001'
45
+ _globals['_REGISTERWORKERREQUEST_RESOURCESENTRY']._loaded_options = None
46
+ _globals['_REGISTERWORKERREQUEST_RESOURCESENTRY']._serialized_options = b'8\001'
47
+ _globals['_TASKTEMPLATE_RESOURCESENTRY']._loaded_options = None
48
+ _globals['_TASKTEMPLATE_RESOURCESENTRY']._serialized_options = b'8\001'
49
+ _globals['_TASKSTATUS']._serialized_start=3292
50
+ _globals['_TASKSTATUS']._serialized_end=3402
51
+ _globals['_OVERLAPPOLICY']._serialized_start=3404
52
+ _globals['_OVERLAPPOLICY']._serialized_end=3478
53
+ _globals['_TASK']._serialized_start=91
54
+ _globals['_TASK']._serialized_end=480
55
+ _globals['_TASK_RESOURCESENTRY']._serialized_start=432
56
+ _globals['_TASK_RESOURCESENTRY']._serialized_end=480
57
+ _globals['_WORKER']._serialized_start=483
58
+ _globals['_WORKER']._serialized_end=661
59
+ _globals['_RESOURCEAVAILABILITY']._serialized_start=664
60
+ _globals['_RESOURCEAVAILABILITY']._serialized_end=906
61
+ _globals['_RESOURCEAVAILABILITY_AVAILABLEENTRY']._serialized_start=812
62
+ _globals['_RESOURCEAVAILABILITY_AVAILABLEENTRY']._serialized_end=860
63
+ _globals['_RESOURCEAVAILABILITY_TOTALENTRY']._serialized_start=862
64
+ _globals['_RESOURCEAVAILABILITY_TOTALENTRY']._serialized_end=906
65
+ _globals['_ENQUEUETASKREQUEST']._serialized_start=909
66
+ _globals['_ENQUEUETASKREQUEST']._serialized_end=1168
67
+ _globals['_ENQUEUETASKREQUEST_RESOURCESENTRY']._serialized_start=432
68
+ _globals['_ENQUEUETASKREQUEST_RESOURCESENTRY']._serialized_end=480
69
+ _globals['_ENQUEUETASKRESPONSE']._serialized_start=1170
70
+ _globals['_ENQUEUETASKRESPONSE']._serialized_end=1208
71
+ _globals['_GETTASKSTATUSREQUEST']._serialized_start=1210
72
+ _globals['_GETTASKSTATUSREQUEST']._serialized_end=1249
73
+ _globals['_GETTASKSTATUSRESPONSE']._serialized_start=1251
74
+ _globals['_GETTASKSTATUSRESPONSE']._serialized_end=1304
75
+ _globals['_CANCELTASKREQUEST']._serialized_start=1306
76
+ _globals['_CANCELTASKREQUEST']._serialized_end=1342
77
+ _globals['_CANCELTASKRESPONSE']._serialized_start=1344
78
+ _globals['_CANCELTASKRESPONSE']._serialized_end=1381
79
+ _globals['_REGISTERWORKERREQUEST']._serialized_start=1384
80
+ _globals['_REGISTERWORKERREQUEST']._serialized_end=1555
81
+ _globals['_REGISTERWORKERREQUEST_RESOURCESENTRY']._serialized_start=432
82
+ _globals['_REGISTERWORKERREQUEST_RESOURCESENTRY']._serialized_end=480
83
+ _globals['_REGISTERWORKERRESPONSE']._serialized_start=1557
84
+ _globals['_REGISTERWORKERRESPONSE']._serialized_end=1600
85
+ _globals['_WORKERHEARTBEATREQUEST']._serialized_start=1602
86
+ _globals['_WORKERHEARTBEATREQUEST']._serialized_end=1696
87
+ _globals['_WORKERHEARTBEATRESPONSE']._serialized_start=1698
88
+ _globals['_WORKERHEARTBEATRESPONSE']._serialized_end=1740
89
+ _globals['_ACKNOWLEDGETASKREQUEST']._serialized_start=1742
90
+ _globals['_ACKNOWLEDGETASKREQUEST']._serialized_end=1835
91
+ _globals['_ACKNOWLEDGETASKRESPONSE']._serialized_start=1837
92
+ _globals['_ACKNOWLEDGETASKRESPONSE']._serialized_end=1879
93
+ _globals['_FETCHTASKSREQUEST']._serialized_start=1881
94
+ _globals['_FETCHTASKSREQUEST']._serialized_end=1938
95
+ _globals['_FETCHTASKSRESPONSE']._serialized_start=1940
96
+ _globals['_FETCHTASKSRESPONSE']._serialized_end=1991
97
+ _globals['_GETQUEUESTATSREQUEST']._serialized_start=1993
98
+ _globals['_GETQUEUESTATSREQUEST']._serialized_end=2015
99
+ _globals['_GETQUEUESTATSRESPONSE']._serialized_start=2018
100
+ _globals['_GETQUEUESTATSRESPONSE']._serialized_end=2160
101
+ _globals['_LISTTASKSREQUEST']._serialized_start=2162
102
+ _globals['_LISTTASKSREQUEST']._serialized_end=2256
103
+ _globals['_LISTTASKSRESPONSE']._serialized_start=2258
104
+ _globals['_LISTTASKSRESPONSE']._serialized_end=2329
105
+ _globals['_LISTWORKERSRESPONSE']._serialized_start=2331
106
+ _globals['_LISTWORKERSRESPONSE']._serialized_end=2387
107
+ _globals['_TASKTEMPLATE']._serialized_start=2390
108
+ _globals['_TASKTEMPLATE']._serialized_end=2596
109
+ _globals['_TASKTEMPLATE_RESOURCESENTRY']._serialized_start=432
110
+ _globals['_TASKTEMPLATE_RESOURCESENTRY']._serialized_end=480
111
+ _globals['_SCHEDULEKIND']._serialized_start=2598
112
+ _globals['_SCHEDULEKIND']._serialized_end=2679
113
+ _globals['_SCHEDULE']._serialized_start=2682
114
+ _globals['_SCHEDULE']._serialized_end=3012
115
+ _globals['_CREATESCHEDULEREQUEST']._serialized_start=3014
116
+ _globals['_CREATESCHEDULEREQUEST']._serialized_end=3075
117
+ _globals['_CREATESCHEDULERESPONSE']._serialized_start=3077
118
+ _globals['_CREATESCHEDULERESPONSE']._serialized_end=3122
119
+ _globals['_LISTSCHEDULESREQUEST']._serialized_start=3124
120
+ _globals['_LISTSCHEDULESREQUEST']._serialized_end=3146
121
+ _globals['_LISTSCHEDULESRESPONSE']._serialized_start=3148
122
+ _globals['_LISTSCHEDULESRESPONSE']._serialized_end=3210
123
+ _globals['_DELETESCHEDULEREQUEST']._serialized_start=3212
124
+ _globals['_DELETESCHEDULEREQUEST']._serialized_end=3247
125
+ _globals['_DELETESCHEDULERESPONSE']._serialized_start=3249
126
+ _globals['_DELETESCHEDULERESPONSE']._serialized_end=3290
127
+ _globals['_CHOPFLOWBROKER']._serialized_start=3481
128
+ _globals['_CHOPFLOWBROKER']._serialized_end=4536
129
+ # @@protoc_insertion_point(module_scope)