ringo-task-queue 0.1.0.dev6__py3-none-win_amd64.whl → 0.1.0.dev8__py3-none-win_amd64.whl
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.
- ringo_task_queue/__init__.py +75 -71
- ringo_task_queue/_pb.py +154 -154
- ringo_task_queue/_proto/ringo/v1/queue_pb2.py +97 -85
- ringo_task_queue/_proto/ringo/v1/queue_pb2_grpc.py +138 -5
- ringo_task_queue/_supervisor_child.py +91 -0
- ringo_task_queue/_supervisor_ipc.py +81 -0
- ringo_task_queue/_supervisor_policy.py +182 -0
- ringo_task_queue/_supervisor_process.py +562 -0
- ringo_task_queue/_supervisor_runtime.py +420 -0
- ringo_task_queue/_supervisor_watchdog.py +429 -0
- ringo_task_queue/_version.py +17 -17
- ringo_task_queue/bin/manifest.json +7 -7
- ringo_task_queue/bin/ringo-task-queue-windows-amd64.exe +0 -0
- ringo_task_queue/binary.py +253 -253
- ringo_task_queue/client.py +1261 -1071
- ringo_task_queue/concurrency.py +480 -480
- ringo_task_queue/daemon.py +507 -507
- ringo_task_queue/errors.py +159 -159
- ringo_task_queue/models.py +449 -364
- ringo_task_queue/shared.py +359 -305
- ringo_task_queue/supervisor.py +575 -0
- ringo_task_queue/worker.py +1868 -1297
- {ringo_task_queue-0.1.0.dev6.dist-info → ringo_task_queue-0.1.0.dev8.dist-info}/METADATA +120 -13
- ringo_task_queue-0.1.0.dev8.dist-info/RECORD +27 -0
- {ringo_task_queue-0.1.0.dev6.dist-info → ringo_task_queue-0.1.0.dev8.dist-info}/licenses/LICENSE +21 -21
- ringo_task_queue-0.1.0.dev6.dist-info/RECORD +0 -20
- {ringo_task_queue-0.1.0.dev6.dist-info → ringo_task_queue-0.1.0.dev8.dist-info}/WHEEL +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
4
4
|
# NO CHECKED-IN PROTOBUF GENCODE
|
|
5
5
|
# source: ringo_task_queue/_proto/ringo/v1/queue.proto
|
|
6
|
-
# Protobuf Python Version:
|
|
6
|
+
# Protobuf Python Version: 5.29.0
|
|
7
7
|
"""Generated protocol buffer code."""
|
|
8
8
|
from google.protobuf import descriptor as _descriptor
|
|
9
9
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -12,9 +12,9 @@ from google.protobuf import symbol_database as _symbol_database
|
|
|
12
12
|
from google.protobuf.internal import builder as _builder
|
|
13
13
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
14
14
|
_runtime_version.Domain.PUBLIC,
|
|
15
|
-
6,
|
|
16
|
-
33,
|
|
17
15
|
5,
|
|
16
|
+
29,
|
|
17
|
+
0,
|
|
18
18
|
'',
|
|
19
19
|
'ringo_task_queue/_proto/ringo/v1/queue.proto'
|
|
20
20
|
)
|
|
@@ -28,7 +28,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
|
28
28
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,ringo_task_queue/_proto/ringo/v1/queue.proto\x12\x08ringo.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"(\n\x12\x41ttachLocalRequest\x12\x12\n\ngeneration\x18\x01 \x01(\t\")\n\x13\x41ttachLocalResponse\x12\x12\n\ngeneration\x18\x01 \x01(\t\"i\n\x10NegotiateRequest\x12\x10\n\x08sdk_name\x18\x01 \x01(\t\x12\x13\n\x0bsdk_version\x18\x02 \x01(\t\x12\x16\n\x0eprotocol_major\x18\x03 \x01(\r\x12\x16\n\x0eprotocol_minor\x18\x04 \x01(\r\"\x88\x01\n\x11NegotiateResponse\x12\x16\n\x0eserver_version\x18\x01 \x01(\t\x12\x16\n\x0eprotocol_major\x18\x02 \x01(\r\x12\x16\n\x0eprotocol_minor\x18\x03 \x01(\r\x12\x14\n\x0c\x63\x61pabilities\x18\x04 \x03(\t\x12\x15\n\rsession_token\x18\x05 \x01(\t\"W\n\x0eRequestContext\x12\x16\n\x0eprotocol_major\x18\x01 \x01(\r\x12\x16\n\x0eprotocol_minor\x18\x02 \x01(\r\x12\x15\n\rsession_token\x18\x03 \x01(\t\"\xbd\x01\n\x0b\x45rrorDetail\x12!\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x13.ringo.v1.ErrorCode\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x35\n\x08metadata\x18\x04 \x03(\x0b\x32#.ringo.v1.ErrorDetail.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xed\x01\n\x0bRetryPolicy\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\r\x12)\n\x08strategy\x18\x02 \x01(\x0e\x32\x17.ringo.v1.RetryStrategy\x12\x30\n\rinitial_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12,\n\tmax_delay\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nmultiplier\x18\x05 \x01(\x01\x12\x0e\n\x06jitter\x18\x06 \x01(\x01\x12\x19\n\x11\x64\x65\x63rease_priority\x18\x07 \x01(\x08\"\xc6\x01\n\x08TaskSpec\x12\x12\n\nunique_key\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\'\n\x07payload\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\x12\x10\n\x08priority\x18\x04 \x01(\x05\x12+\n\x0cretry_policy\x18\x05 \x01(\x0b\x32\x15.ringo.v1.RetryPolicy\x12\x30\n\x0c\x61vailable_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xb8\x04\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05queue\x18\x02 \x01(\t\x12\x12\n\nunique_key\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\'\n\x07payload\x18\x05 \x01(\x0b\x32\x16.google.protobuf.Value\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12$\n\x06status\x18\x07 \x01(\x0e\x32\x14.ringo.v1.TaskStatus\x12\x0f\n\x07\x61ttempt\x18\x08 \x01(\r\x12\x14\n\x0cmax_attempts\x18\t \x01(\r\x12\x30\n\x0c\x61vailable_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\ncreated_at\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0c\x63ompleted_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nlast_error\x18\x0e \x01(\t\x12\x1c\n\x14last_error_truncated\x18\x0f \x01(\x08\x12#\n\x08\x61ttempts\x18\x10 \x03(\x0b\x32\x11.ringo.v1.Attempt\x12$\n\x08progress\x18\x11 \x01(\x0b\x32\x12.ringo.v1.Progress\x12*\n\rcurrent_lease\x18\x12 \x01(\x0b\x32\x13.ringo.v1.LeaseInfo\"\xc6\x01\n\x07\x41ttempt\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12.\n\nstarted_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07outcome\x18\x05 \x01(\t\x12\r\n\x05\x65rror\x18\x06 \x01(\t\x12\x17\n\x0f\x65rror_truncated\x18\x07 \x01(\x08\"k\n\x08Progress\x12\x0f\n\x07\x63urrent\x18\x01 \x01(\x01\x12\r\n\x05total\x18\x02 \x01(\x01\x12\x0f\n\x07message\x18\x03 \x01(\t\x12.\n\nupdated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Z\n\tLeaseInfo\x12\x0f\n\x07\x61ttempt\x18\x01 \x01(\r\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12)\n\x05until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"|\n\x05Lease\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\r\x12\x13\n\x0blease_token\x18\x03 \x01(\t\x12\x11\n\tworker_id\x18\x04 \x01(\t\x12)\n\x05until\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"J\n\nLeasedTask\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\x12\x1e\n\x05lease\x18\x02 \x01(\x0b\x32\x0f.ringo.v1.Lease\"l\n\x0e\x45nqueueRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12 \n\x04task\x18\x02 \x01(\x0b\x32\x12.ringo.v1.TaskSpec\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"O\n\rEnqueueResult\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x63reated\x18\x02 \x01(\x08\x12\x1c\n\x04task\x18\x03 \x01(\x0b\x32\x0e.ringo.v1.Task\":\n\x0f\x45nqueueResponse\x12\'\n\x06result\x18\x01 \x01(\x0b\x32\x17.ringo.v1.EnqueueResult\"q\n\x12\x45nqueueManyRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12!\n\x05tasks\x18\x02 \x03(\x0b\x32\x12.ringo.v1.TaskSpec\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"o\n\x13\x45nqueueManyResponse\x12(\n\x07results\x18\x01 \x03(\x0b\x32\x17.ringo.v1.EnqueueResult\x12\x15\n\rcreated_count\x18\x02 \x01(\r\x12\x17\n\x0f\x64uplicate_count\x18\x03 \x01(\r\"z\n\x0eGetTaskRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\x07task_id\x18\x02 \x01(\tH\x00\x12\x14\n\nunique_key\x18\x03 \x01(\tH\x00\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContextB\x05\n\x03key\"/\n\x0fGetTaskResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\"g\n\x17GetQueueActivityRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x12\n\ntask_types\x18\x02 \x03(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"5\n\x18GetQueueActivityResponse\x12\x19\n\x11\x61\x63tive_task_count\x18\x01 \x01(\x04\"|\n\x10RetryTaskRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\x07task_id\x18\x02 \x01(\tH\x00\x12\x14\n\nunique_key\x18\x03 \x01(\tH\x00\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContextB\x05\n\x03key\"1\n\x11RetryTaskResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\"\xe2\x01\n\x0c\x43laimRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12\x12\n\ntask_types\x18\x03 \x03(\t\x12\r\n\x05limit\x18\x04 \x01(\r\x12/\n\x0cwait_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0elease_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"4\n\rClaimResponse\x12#\n\x05tasks\x18\x01 \x03(\x0b\x32\x14.ringo.v1.LeasedTask\"A\n\x08LeaseRef\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\r\x12\x13\n\x0blease_token\x18\x03 \x01(\t\"Z\n\nAckRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"\r\n\x0b\x41\x63kResponse\"\xa3\x01\n\x0bNackRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12\x37\n\x14retry_delay_override\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\",\n\x0cNackResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\"l\n\rRejectRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\".\n\x0eRejectResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\"\x90\x01\n\x12\x45xtendLeaseRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12,\n\textension\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"5\n\x13\x45xtendLeaseResponse\x12\x1e\n\x05lease\x18\x01 \x01(\x0b\x32\x0f.ringo.v1.Lease\"\x96\x01\n\x15ReportProgressRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12\x0f\n\x07\x63urrent\x18\x02 \x01(\x01\x12\r\n\x05total\x18\x03 \x01(\x01\x12\x0f\n\x07message\x18\x04 \x01(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"\x18\n\x16ReportProgressResponse\"\xc1\x01\n\x12WorkerRegistration\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12\x12\n\ntask_types\x18\x03 \x03(\t\x12\x17\n\x0fmax_concurrency\x18\x04 \x01(\r\x12\x31\n\x0elease_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"Y\n\x0c\x43reditUpdate\x12\x11\n\tavailable\x18\x01 \x01(\r\x12\x1f\n\x12target_concurrency\x18\x02 \x01(\rH\x00\x88\x01\x01\x42\x15\n\x13_target_concurrency\"\x1c\n\x0bWorkerDrain\x12\r\n\x05\x62\x65gin\x18\x01 \x01(\x08\"q\n\x10WorkerRegistered\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x17\n\x0fmax_concurrency\x18\x02 \x01(\r\x12\x31\n\x0elease_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8f\x03\n\x0bWorkRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\x04\x12\x30\n\x08register\x18\x02 \x01(\x0b\x32\x1c.ringo.v1.WorkerRegistrationH\x00\x12(\n\x06\x63redit\x18\x03 \x01(\x0b\x32\x16.ringo.v1.CreditUpdateH\x00\x12#\n\x03\x61\x63k\x18\x04 \x01(\x0b\x32\x14.ringo.v1.AckRequestH\x00\x12%\n\x04nack\x18\x05 \x01(\x0b\x32\x15.ringo.v1.NackRequestH\x00\x12)\n\x06reject\x18\x06 \x01(\x0b\x32\x17.ringo.v1.RejectRequestH\x00\x12\x34\n\x0c\x65xtend_lease\x18\x07 \x01(\x0b\x32\x1c.ringo.v1.ExtendLeaseRequestH\x00\x12\x33\n\x08progress\x18\x08 \x01(\x0b\x32\x1f.ringo.v1.ReportProgressRequestH\x00\x12&\n\x05\x64rain\x18\t \x01(\x0b\x32\x15.ringo.v1.WorkerDrainH\x00\x42\x06\n\x04\x62ody\"F\n\nWorkResult\x12\x12\n\nrequest_id\x18\x01 \x01(\x04\x12$\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x15.ringo.v1.ErrorDetail\"\xc7\x01\n\x0cWorkResponse\x12$\n\x04task\x18\x01 \x01(\x0b\x32\x14.ringo.v1.LeasedTaskH\x00\x12&\n\x06result\x18\x02 \x01(\x0b\x32\x14.ringo.v1.WorkResultH\x00\x12/\n\theartbeat\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x30\n\nregistered\x18\x04 \x01(\x0b\x32\x1a.ringo.v1.WorkerRegisteredH\x00\x42\x06\n\x04\x62ody*\xbf\x01\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15TASK_STATUS_SCHEDULED\x10\x01\x12\x15\n\x11TASK_STATUS_READY\x10\x02\x12\x16\n\x12TASK_STATUS_LEASED\x10\x03\x12\x19\n\x15TASK_STATUS_SUCCEEDED\x10\x04\x12\x14\n\x10TASK_STATUS_DEAD\x10\x05\x12\x19\n\x15TASK_STATUS_CANCELLED\x10\x06*i\n\rRetryStrategy\x12\x1e\n\x1aRETRY_STRATEGY_UNSPECIFIED\x10\x00\x12\x18\n\x14RETRY_STRATEGY_FIXED\x10\x01\x12\x1e\n\x1aRETRY_STRATEGY_EXPONENTIAL\x10\x02*\xac\x02\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45RROR_CODE_INVALID_ARGUMENT\x10\x01\x12\x18\n\x14\x45RROR_CODE_DUPLICATE\x10\x02\x12\x18\n\x14\x45RROR_CODE_NOT_FOUND\x10\x03\x12\x17\n\x13\x45RROR_CODE_CONFLICT\x10\x04\x12\x19\n\x15\x45RROR_CODE_LEASE_LOST\x10\x05\x12\x1a\n\x16\x45RROR_CODE_UNAVAILABLE\x10\x06\x12 \n\x1c\x45RROR_CODE_DEADLINE_EXCEEDED\x10\x07\x12#\n\x1f\x45RROR_CODE_INCOMPATIBLE_VERSION\x10\x08\x12\x17\n\x13\x45RROR_CODE_INTERNAL\x10\t2\xcd\x07\n\x0cQueueService\x12\x44\n\tNegotiate\x12\x1a.ringo.v1.NegotiateRequest\x1a\x1b.ringo.v1.NegotiateResponse\x12>\n\x07\x45nqueue\x12\x18.ringo.v1.EnqueueRequest\x1a\x19.ringo.v1.EnqueueResponse\x12J\n\x0b\x45nqueueMany\x12\x1c.ringo.v1.EnqueueManyRequest\x1a\x1d.ringo.v1.EnqueueManyResponse\x12>\n\x07GetTask\x12\x18.ringo.v1.GetTaskRequest\x1a\x19.ringo.v1.GetTaskResponse\x12Y\n\x10GetQueueActivity\x12!.ringo.v1.GetQueueActivityRequest\x1a\".ringo.v1.GetQueueActivityResponse\x12\x44\n\tRetryTask\x12\x1a.ringo.v1.RetryTaskRequest\x1a\x1b.ringo.v1.RetryTaskResponse\x12\x38\n\x05\x43laim\x12\x16.ringo.v1.ClaimRequest\x1a\x17.ringo.v1.ClaimResponse\x12\x32\n\x03\x41\x63k\x12\x14.ringo.v1.AckRequest\x1a\x15.ringo.v1.AckResponse\x12\x35\n\x04Nack\x12\x15.ringo.v1.NackRequest\x1a\x16.ringo.v1.NackResponse\x12;\n\x06Reject\x12\x17.ringo.v1.RejectRequest\x1a\x18.ringo.v1.RejectResponse\x12J\n\x0b\x45xtendLease\x12\x1c.ringo.v1.ExtendLeaseRequest\x1a\x1d.ringo.v1.ExtendLeaseResponse\x12S\n\x0eReportProgress\x12\x1f.ringo.v1.ReportProgressRequest\x1a .ringo.v1.ReportProgressResponse\x12\x39\n\x04Work\x12\x15.ringo.v1.WorkRequest\x1a\x16.ringo.v1.WorkResponse(\x01\x30\x01\x12L\n\x0b\x41ttachLocal\x12\x1c.ringo.v1.AttachLocalRequest\x1a\x1d.ringo.v1.AttachLocalResponse0\x01\x42l\n\x16\x64\x65v.ringo.taskqueue.v1B\nQueueProtoP\x01ZDgithub.com/ringo-task-queue/ringo-task-queue/gen/go/ringo/v1;ringov1b\x06proto3')
|
|
31
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,ringo_task_queue/_proto/ringo/v1/queue.proto\x12\x08ringo.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"(\n\x12\x41ttachLocalRequest\x12\x12\n\ngeneration\x18\x01 \x01(\t\")\n\x13\x41ttachLocalResponse\x12\x12\n\ngeneration\x18\x01 \x01(\t\"i\n\x10NegotiateRequest\x12\x10\n\x08sdk_name\x18\x01 \x01(\t\x12\x13\n\x0bsdk_version\x18\x02 \x01(\t\x12\x16\n\x0eprotocol_major\x18\x03 \x01(\r\x12\x16\n\x0eprotocol_minor\x18\x04 \x01(\r\"\x88\x01\n\x11NegotiateResponse\x12\x16\n\x0eserver_version\x18\x01 \x01(\t\x12\x16\n\x0eprotocol_major\x18\x02 \x01(\r\x12\x16\n\x0eprotocol_minor\x18\x03 \x01(\r\x12\x14\n\x0c\x63\x61pabilities\x18\x04 \x03(\t\x12\x15\n\rsession_token\x18\x05 \x01(\t\"W\n\x0eRequestContext\x12\x16\n\x0eprotocol_major\x18\x01 \x01(\r\x12\x16\n\x0eprotocol_minor\x18\x02 \x01(\r\x12\x15\n\rsession_token\x18\x03 \x01(\t\"\xbd\x01\n\x0b\x45rrorDetail\x12!\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x13.ringo.v1.ErrorCode\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x12\n\nrequest_id\x18\x03 \x01(\t\x12\x35\n\x08metadata\x18\x04 \x03(\x0b\x32#.ringo.v1.ErrorDetail.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xed\x01\n\x0bRetryPolicy\x12\x14\n\x0cmax_attempts\x18\x01 \x01(\r\x12)\n\x08strategy\x18\x02 \x01(\x0e\x32\x17.ringo.v1.RetryStrategy\x12\x30\n\rinitial_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12,\n\tmax_delay\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x12\n\nmultiplier\x18\x05 \x01(\x01\x12\x0e\n\x06jitter\x18\x06 \x01(\x01\x12\x19\n\x11\x64\x65\x63rease_priority\x18\x07 \x01(\x08\"\xc6\x01\n\x08TaskSpec\x12\x12\n\nunique_key\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\x12\'\n\x07payload\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\x12\x10\n\x08priority\x18\x04 \x01(\x05\x12+\n\x0cretry_policy\x18\x05 \x01(\x0b\x32\x15.ringo.v1.RetryPolicy\x12\x30\n\x0c\x61vailable_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xd4\x04\n\x04Task\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05queue\x18\x02 \x01(\t\x12\x12\n\nunique_key\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\'\n\x07payload\x18\x05 \x01(\x0b\x32\x16.google.protobuf.Value\x12\x10\n\x08priority\x18\x06 \x01(\x05\x12$\n\x06status\x18\x07 \x01(\x0e\x32\x14.ringo.v1.TaskStatus\x12\x0f\n\x07\x61ttempt\x18\x08 \x01(\r\x12\x14\n\x0cmax_attempts\x18\t \x01(\r\x12\x30\n\x0c\x61vailable_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\ncreated_at\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0c\x63ompleted_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\nlast_error\x18\x0e \x01(\t\x12\x1c\n\x14last_error_truncated\x18\x0f \x01(\x08\x12#\n\x08\x61ttempts\x18\x10 \x03(\x0b\x32\x11.ringo.v1.Attempt\x12$\n\x08progress\x18\x11 \x01(\x0b\x32\x12.ringo.v1.Progress\x12*\n\rcurrent_lease\x18\x12 \x01(\x0b\x32\x13.ringo.v1.LeaseInfo\x12\x1a\n\x12\x61ttempts_truncated\x18\x13 \x01(\x08\"\xda\x01\n\x07\x41ttempt\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12.\n\nstarted_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0b\x66inished_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07outcome\x18\x05 \x01(\t\x12\r\n\x05\x65rror\x18\x06 \x01(\t\x12\x17\n\x0f\x65rror_truncated\x18\x07 \x01(\x08\x12\x12\n\nhistory_id\x18\x08 \x01(\x04\"k\n\x08Progress\x12\x0f\n\x07\x63urrent\x18\x01 \x01(\x01\x12\r\n\x05total\x18\x02 \x01(\x01\x12\x0f\n\x07message\x18\x03 \x01(\t\x12.\n\nupdated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"Z\n\tLeaseInfo\x12\x0f\n\x07\x61ttempt\x18\x01 \x01(\r\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12)\n\x05until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"|\n\x05Lease\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\r\x12\x13\n\x0blease_token\x18\x03 \x01(\t\x12\x11\n\tworker_id\x18\x04 \x01(\t\x12)\n\x05until\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"J\n\nLeasedTask\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\x12\x1e\n\x05lease\x18\x02 \x01(\x0b\x32\x0f.ringo.v1.Lease\"l\n\x0e\x45nqueueRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12 \n\x04task\x18\x02 \x01(\x0b\x32\x12.ringo.v1.TaskSpec\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"O\n\rEnqueueResult\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x63reated\x18\x02 \x01(\x08\x12\x1c\n\x04task\x18\x03 \x01(\x0b\x32\x0e.ringo.v1.Task\":\n\x0f\x45nqueueResponse\x12\'\n\x06result\x18\x01 \x01(\x0b\x32\x17.ringo.v1.EnqueueResult\"q\n\x12\x45nqueueManyRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12!\n\x05tasks\x18\x02 \x03(\x0b\x32\x12.ringo.v1.TaskSpec\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"o\n\x13\x45nqueueManyResponse\x12(\n\x07results\x18\x01 \x03(\x0b\x32\x17.ringo.v1.EnqueueResult\x12\x15\n\rcreated_count\x18\x02 \x01(\r\x12\x17\n\x0f\x64uplicate_count\x18\x03 \x01(\r\"z\n\x0eGetTaskRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\x07task_id\x18\x02 \x01(\tH\x00\x12\x14\n\nunique_key\x18\x03 \x01(\tH\x00\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContextB\x05\n\x03key\"/\n\x0fGetTaskResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\"\xa1\x01\n\x16GetTaskAttemptsRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\x07task_id\x18\x02 \x01(\tH\x00\x12\x14\n\nunique_key\x18\x03 \x01(\tH\x00\x12\r\n\x05limit\x18\x04 \x01(\r\x12\x0e\n\x06\x63ursor\x18\x05 \x01(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContextB\x05\n\x03key\"S\n\x17GetTaskAttemptsResponse\x12#\n\x08\x61ttempts\x18\x01 \x03(\x0b\x32\x11.ringo.v1.Attempt\x12\x13\n\x0bnext_cursor\x18\x02 \x01(\t\"g\n\x17GetQueueActivityRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x12\n\ntask_types\x18\x02 \x03(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"5\n\x18GetQueueActivityResponse\x12\x19\n\x11\x61\x63tive_task_count\x18\x01 \x01(\x04\"d\n\x14GetQueueStatsRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x12\n\ntask_types\x18\x02 \x03(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"\xbd\x02\n\x15GetQueueStatsResponse\x12\x17\n\x0fscheduled_count\x18\x01 \x01(\x04\x12\x13\n\x0bready_count\x18\x02 \x01(\x04\x12\x14\n\x0cleased_count\x18\x03 \x01(\x04\x12\x17\n\x0fsucceeded_count\x18\x04 \x01(\x04\x12\x12\n\ndead_count\x18\x05 \x01(\x04\x12\x17\n\x0f\x63\x61ncelled_count\x18\x06 \x01(\x04\x12/\n\x0bobserved_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0foldest_ready_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_activity_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"|\n\x10RetryTaskRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\x07task_id\x18\x02 \x01(\tH\x00\x12\x14\n\nunique_key\x18\x03 \x01(\tH\x00\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContextB\x05\n\x03key\"1\n\x11RetryTaskResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\"\xe2\x01\n\x0c\x43laimRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12\x12\n\ntask_types\x18\x03 \x03(\t\x12\r\n\x05limit\x18\x04 \x01(\r\x12/\n\x0cwait_timeout\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x31\n\x0elease_duration\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"4\n\rClaimResponse\x12#\n\x05tasks\x18\x01 \x03(\x0b\x32\x14.ringo.v1.LeasedTask\"A\n\x08LeaseRef\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x0f\n\x07\x61ttempt\x18\x02 \x01(\r\x12\x13\n\x0blease_token\x18\x03 \x01(\t\"Z\n\nAckRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"\r\n\x0b\x41\x63kResponse\"\xa3\x01\n\x0bNackRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12\x37\n\x14retry_delay_override\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\",\n\x0cNackResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\"l\n\rRejectRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12\r\n\x05\x65rror\x18\x02 \x01(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\".\n\x0eRejectResponse\x12\x1c\n\x04task\x18\x01 \x01(\x0b\x32\x0e.ringo.v1.Task\"\x90\x01\n\x12\x45xtendLeaseRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12,\n\textension\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"5\n\x13\x45xtendLeaseResponse\x12\x1e\n\x05lease\x18\x01 \x01(\x0b\x32\x0f.ringo.v1.Lease\"\x96\x01\n\x15ReportProgressRequest\x12!\n\x05lease\x18\x01 \x01(\x0b\x32\x12.ringo.v1.LeaseRef\x12\x0f\n\x07\x63urrent\x18\x02 \x01(\x01\x12\r\n\x05total\x18\x03 \x01(\x01\x12\x0f\n\x07message\x18\x04 \x01(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"\x18\n\x16ReportProgressResponse\"\xde\x01\n\x12WorkerRegistration\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x11\n\tworker_id\x18\x02 \x01(\t\x12\x12\n\ntask_types\x18\x03 \x03(\t\x12\x17\n\x0fmax_concurrency\x18\x04 \x01(\r\x12\x31\n\x0elease_duration\x18\x05 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1b\n\x13ordered_request_ids\x18\x06 \x01(\x08\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"Y\n\x0c\x43reditUpdate\x12\x11\n\tavailable\x18\x01 \x01(\r\x12\x1f\n\x12target_concurrency\x18\x02 \x01(\rH\x00\x88\x01\x01\x42\x15\n\x13_target_concurrency\"\x1c\n\x0bWorkerDrain\x12\r\n\x05\x62\x65gin\x18\x01 \x01(\x08\"\x8e\x01\n\x10WorkerRegistered\x12\x11\n\tworker_id\x18\x01 \x01(\t\x12\x17\n\x0fmax_concurrency\x18\x02 \x01(\r\x12\x31\n\x0elease_duration\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1b\n\x13ordered_request_ids\x18\x04 \x01(\x08\"\x8f\x03\n\x0bWorkRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\x04\x12\x30\n\x08register\x18\x02 \x01(\x0b\x32\x1c.ringo.v1.WorkerRegistrationH\x00\x12(\n\x06\x63redit\x18\x03 \x01(\x0b\x32\x16.ringo.v1.CreditUpdateH\x00\x12#\n\x03\x61\x63k\x18\x04 \x01(\x0b\x32\x14.ringo.v1.AckRequestH\x00\x12%\n\x04nack\x18\x05 \x01(\x0b\x32\x15.ringo.v1.NackRequestH\x00\x12)\n\x06reject\x18\x06 \x01(\x0b\x32\x17.ringo.v1.RejectRequestH\x00\x12\x34\n\x0c\x65xtend_lease\x18\x07 \x01(\x0b\x32\x1c.ringo.v1.ExtendLeaseRequestH\x00\x12\x33\n\x08progress\x18\x08 \x01(\x0b\x32\x1f.ringo.v1.ReportProgressRequestH\x00\x12&\n\x05\x64rain\x18\t \x01(\x0b\x32\x15.ringo.v1.WorkerDrainH\x00\x42\x06\n\x04\x62ody\"F\n\nWorkResult\x12\x12\n\nrequest_id\x18\x01 \x01(\x04\x12$\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x15.ringo.v1.ErrorDetail\"\xc7\x01\n\x0cWorkResponse\x12$\n\x04task\x18\x01 \x01(\x0b\x32\x14.ringo.v1.LeasedTaskH\x00\x12&\n\x06result\x18\x02 \x01(\x0b\x32\x14.ringo.v1.WorkResultH\x00\x12/\n\theartbeat\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x30\n\nregistered\x18\x04 \x01(\x0b\x32\x1a.ringo.v1.WorkerRegisteredH\x00\x42\x06\n\x04\x62ody\"a\n\x11ProbeQueueRequest\x12\r\n\x05queue\x18\x01 \x01(\t\x12\x12\n\ntask_types\x18\x02 \x03(\t\x12)\n\x07\x63ontext\x18\x0f \x01(\x0b\x32\x18.ringo.v1.RequestContext\"0\n\x12ProbeQueueResponse\x12\x1a\n\x12has_eligible_tasks\x18\x01 \x01(\x08*\xbf\x01\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15TASK_STATUS_SCHEDULED\x10\x01\x12\x15\n\x11TASK_STATUS_READY\x10\x02\x12\x16\n\x12TASK_STATUS_LEASED\x10\x03\x12\x19\n\x15TASK_STATUS_SUCCEEDED\x10\x04\x12\x14\n\x10TASK_STATUS_DEAD\x10\x05\x12\x19\n\x15TASK_STATUS_CANCELLED\x10\x06*i\n\rRetryStrategy\x12\x1e\n\x1aRETRY_STRATEGY_UNSPECIFIED\x10\x00\x12\x18\n\x14RETRY_STRATEGY_FIXED\x10\x01\x12\x1e\n\x1aRETRY_STRATEGY_EXPONENTIAL\x10\x02*\xac\x02\n\tErrorCode\x12\x1a\n\x16\x45RROR_CODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1b\x45RROR_CODE_INVALID_ARGUMENT\x10\x01\x12\x18\n\x14\x45RROR_CODE_DUPLICATE\x10\x02\x12\x18\n\x14\x45RROR_CODE_NOT_FOUND\x10\x03\x12\x17\n\x13\x45RROR_CODE_CONFLICT\x10\x04\x12\x19\n\x15\x45RROR_CODE_LEASE_LOST\x10\x05\x12\x1a\n\x16\x45RROR_CODE_UNAVAILABLE\x10\x06\x12 \n\x1c\x45RROR_CODE_DEADLINE_EXCEEDED\x10\x07\x12#\n\x1f\x45RROR_CODE_INCOMPATIBLE_VERSION\x10\x08\x12\x17\n\x13\x45RROR_CODE_INTERNAL\x10\t2\xc0\t\n\x0cQueueService\x12\x44\n\tNegotiate\x12\x1a.ringo.v1.NegotiateRequest\x1a\x1b.ringo.v1.NegotiateResponse\x12>\n\x07\x45nqueue\x12\x18.ringo.v1.EnqueueRequest\x1a\x19.ringo.v1.EnqueueResponse\x12J\n\x0b\x45nqueueMany\x12\x1c.ringo.v1.EnqueueManyRequest\x1a\x1d.ringo.v1.EnqueueManyResponse\x12>\n\x07GetTask\x12\x18.ringo.v1.GetTaskRequest\x1a\x19.ringo.v1.GetTaskResponse\x12V\n\x0fGetTaskAttempts\x12 .ringo.v1.GetTaskAttemptsRequest\x1a!.ringo.v1.GetTaskAttemptsResponse\x12Y\n\x10GetQueueActivity\x12!.ringo.v1.GetQueueActivityRequest\x1a\".ringo.v1.GetQueueActivityResponse\x12P\n\rGetQueueStats\x12\x1e.ringo.v1.GetQueueStatsRequest\x1a\x1f.ringo.v1.GetQueueStatsResponse\x12\x44\n\tRetryTask\x12\x1a.ringo.v1.RetryTaskRequest\x1a\x1b.ringo.v1.RetryTaskResponse\x12\x38\n\x05\x43laim\x12\x16.ringo.v1.ClaimRequest\x1a\x17.ringo.v1.ClaimResponse\x12\x32\n\x03\x41\x63k\x12\x14.ringo.v1.AckRequest\x1a\x15.ringo.v1.AckResponse\x12\x35\n\x04Nack\x12\x15.ringo.v1.NackRequest\x1a\x16.ringo.v1.NackResponse\x12;\n\x06Reject\x12\x17.ringo.v1.RejectRequest\x1a\x18.ringo.v1.RejectResponse\x12J\n\x0b\x45xtendLease\x12\x1c.ringo.v1.ExtendLeaseRequest\x1a\x1d.ringo.v1.ExtendLeaseResponse\x12S\n\x0eReportProgress\x12\x1f.ringo.v1.ReportProgressRequest\x1a .ringo.v1.ReportProgressResponse\x12\x39\n\x04Work\x12\x15.ringo.v1.WorkRequest\x1a\x16.ringo.v1.WorkResponse(\x01\x30\x01\x12L\n\x0b\x41ttachLocal\x12\x1c.ringo.v1.AttachLocalRequest\x1a\x1d.ringo.v1.AttachLocalResponse0\x01\x12G\n\nProbeQueue\x12\x1b.ringo.v1.ProbeQueueRequest\x1a\x1c.ringo.v1.ProbeQueueResponseBl\n\x16\x64\x65v.ringo.taskqueue.v1B\nQueueProtoP\x01ZDgithub.com/ringo-task-queue/ringo-task-queue/gen/go/ringo/v1;ringov1b\x06proto3')
|
|
32
32
|
|
|
33
33
|
_globals = globals()
|
|
34
34
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -38,12 +38,12 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
38
38
|
_globals['DESCRIPTOR']._serialized_options = b'\n\026dev.ringo.taskqueue.v1B\nQueueProtoP\001ZDgithub.com/ringo-task-queue/ringo-task-queue/gen/go/ringo/v1;ringov1'
|
|
39
39
|
_globals['_ERRORDETAIL_METADATAENTRY']._loaded_options = None
|
|
40
40
|
_globals['_ERRORDETAIL_METADATAENTRY']._serialized_options = b'8\001'
|
|
41
|
-
_globals['_TASKSTATUS']._serialized_start=
|
|
42
|
-
_globals['_TASKSTATUS']._serialized_end=
|
|
43
|
-
_globals['_RETRYSTRATEGY']._serialized_start=
|
|
44
|
-
_globals['_RETRYSTRATEGY']._serialized_end=
|
|
45
|
-
_globals['_ERRORCODE']._serialized_start=
|
|
46
|
-
_globals['_ERRORCODE']._serialized_end=
|
|
41
|
+
_globals['_TASKSTATUS']._serialized_start=6614
|
|
42
|
+
_globals['_TASKSTATUS']._serialized_end=6805
|
|
43
|
+
_globals['_RETRYSTRATEGY']._serialized_start=6807
|
|
44
|
+
_globals['_RETRYSTRATEGY']._serialized_end=6912
|
|
45
|
+
_globals['_ERRORCODE']._serialized_start=6915
|
|
46
|
+
_globals['_ERRORCODE']._serialized_end=7215
|
|
47
47
|
_globals['_ATTACHLOCALREQUEST']._serialized_start=153
|
|
48
48
|
_globals['_ATTACHLOCALREQUEST']._serialized_end=193
|
|
49
49
|
_globals['_ATTACHLOCALRESPONSE']._serialized_start=195
|
|
@@ -63,79 +63,91 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
63
63
|
_globals['_TASKSPEC']._serialized_start=1006
|
|
64
64
|
_globals['_TASKSPEC']._serialized_end=1204
|
|
65
65
|
_globals['_TASK']._serialized_start=1207
|
|
66
|
-
_globals['_TASK']._serialized_end=
|
|
67
|
-
_globals['_ATTEMPT']._serialized_start=
|
|
68
|
-
_globals['_ATTEMPT']._serialized_end=
|
|
69
|
-
_globals['_PROGRESS']._serialized_start=
|
|
70
|
-
_globals['_PROGRESS']._serialized_end=
|
|
71
|
-
_globals['_LEASEINFO']._serialized_start=
|
|
72
|
-
_globals['_LEASEINFO']._serialized_end=
|
|
73
|
-
_globals['_LEASE']._serialized_start=
|
|
74
|
-
_globals['_LEASE']._serialized_end=
|
|
75
|
-
_globals['_LEASEDTASK']._serialized_start=
|
|
76
|
-
_globals['_LEASEDTASK']._serialized_end=
|
|
77
|
-
_globals['_ENQUEUEREQUEST']._serialized_start=
|
|
78
|
-
_globals['_ENQUEUEREQUEST']._serialized_end=
|
|
79
|
-
_globals['_ENQUEUERESULT']._serialized_start=
|
|
80
|
-
_globals['_ENQUEUERESULT']._serialized_end=
|
|
81
|
-
_globals['_ENQUEUERESPONSE']._serialized_start=
|
|
82
|
-
_globals['_ENQUEUERESPONSE']._serialized_end=
|
|
83
|
-
_globals['_ENQUEUEMANYREQUEST']._serialized_start=
|
|
84
|
-
_globals['_ENQUEUEMANYREQUEST']._serialized_end=
|
|
85
|
-
_globals['_ENQUEUEMANYRESPONSE']._serialized_start=
|
|
86
|
-
_globals['_ENQUEUEMANYRESPONSE']._serialized_end=
|
|
87
|
-
_globals['_GETTASKREQUEST']._serialized_start=
|
|
88
|
-
_globals['_GETTASKREQUEST']._serialized_end=
|
|
89
|
-
_globals['_GETTASKRESPONSE']._serialized_start=
|
|
90
|
-
_globals['_GETTASKRESPONSE']._serialized_end=
|
|
91
|
-
_globals['
|
|
92
|
-
_globals['
|
|
93
|
-
_globals['
|
|
94
|
-
_globals['
|
|
95
|
-
_globals['
|
|
96
|
-
_globals['
|
|
97
|
-
_globals['
|
|
98
|
-
_globals['
|
|
99
|
-
_globals['
|
|
100
|
-
_globals['
|
|
101
|
-
_globals['
|
|
102
|
-
_globals['
|
|
103
|
-
_globals['
|
|
104
|
-
_globals['
|
|
105
|
-
_globals['
|
|
106
|
-
_globals['
|
|
107
|
-
_globals['
|
|
108
|
-
_globals['
|
|
109
|
-
_globals['
|
|
110
|
-
_globals['
|
|
111
|
-
_globals['
|
|
112
|
-
_globals['
|
|
113
|
-
_globals['
|
|
114
|
-
_globals['
|
|
115
|
-
_globals['
|
|
116
|
-
_globals['
|
|
117
|
-
_globals['
|
|
118
|
-
_globals['
|
|
119
|
-
_globals['
|
|
120
|
-
_globals['
|
|
121
|
-
_globals['
|
|
122
|
-
_globals['
|
|
123
|
-
_globals['
|
|
124
|
-
_globals['
|
|
125
|
-
_globals['
|
|
126
|
-
_globals['
|
|
127
|
-
_globals['
|
|
128
|
-
_globals['
|
|
129
|
-
_globals['
|
|
130
|
-
_globals['
|
|
131
|
-
_globals['
|
|
132
|
-
_globals['
|
|
133
|
-
_globals['
|
|
134
|
-
_globals['
|
|
135
|
-
_globals['
|
|
136
|
-
_globals['
|
|
137
|
-
_globals['
|
|
138
|
-
_globals['
|
|
139
|
-
_globals['
|
|
140
|
-
_globals['
|
|
66
|
+
_globals['_TASK']._serialized_end=1803
|
|
67
|
+
_globals['_ATTEMPT']._serialized_start=1806
|
|
68
|
+
_globals['_ATTEMPT']._serialized_end=2024
|
|
69
|
+
_globals['_PROGRESS']._serialized_start=2026
|
|
70
|
+
_globals['_PROGRESS']._serialized_end=2133
|
|
71
|
+
_globals['_LEASEINFO']._serialized_start=2135
|
|
72
|
+
_globals['_LEASEINFO']._serialized_end=2225
|
|
73
|
+
_globals['_LEASE']._serialized_start=2227
|
|
74
|
+
_globals['_LEASE']._serialized_end=2351
|
|
75
|
+
_globals['_LEASEDTASK']._serialized_start=2353
|
|
76
|
+
_globals['_LEASEDTASK']._serialized_end=2427
|
|
77
|
+
_globals['_ENQUEUEREQUEST']._serialized_start=2429
|
|
78
|
+
_globals['_ENQUEUEREQUEST']._serialized_end=2537
|
|
79
|
+
_globals['_ENQUEUERESULT']._serialized_start=2539
|
|
80
|
+
_globals['_ENQUEUERESULT']._serialized_end=2618
|
|
81
|
+
_globals['_ENQUEUERESPONSE']._serialized_start=2620
|
|
82
|
+
_globals['_ENQUEUERESPONSE']._serialized_end=2678
|
|
83
|
+
_globals['_ENQUEUEMANYREQUEST']._serialized_start=2680
|
|
84
|
+
_globals['_ENQUEUEMANYREQUEST']._serialized_end=2793
|
|
85
|
+
_globals['_ENQUEUEMANYRESPONSE']._serialized_start=2795
|
|
86
|
+
_globals['_ENQUEUEMANYRESPONSE']._serialized_end=2906
|
|
87
|
+
_globals['_GETTASKREQUEST']._serialized_start=2908
|
|
88
|
+
_globals['_GETTASKREQUEST']._serialized_end=3030
|
|
89
|
+
_globals['_GETTASKRESPONSE']._serialized_start=3032
|
|
90
|
+
_globals['_GETTASKRESPONSE']._serialized_end=3079
|
|
91
|
+
_globals['_GETTASKATTEMPTSREQUEST']._serialized_start=3082
|
|
92
|
+
_globals['_GETTASKATTEMPTSREQUEST']._serialized_end=3243
|
|
93
|
+
_globals['_GETTASKATTEMPTSRESPONSE']._serialized_start=3245
|
|
94
|
+
_globals['_GETTASKATTEMPTSRESPONSE']._serialized_end=3328
|
|
95
|
+
_globals['_GETQUEUEACTIVITYREQUEST']._serialized_start=3330
|
|
96
|
+
_globals['_GETQUEUEACTIVITYREQUEST']._serialized_end=3433
|
|
97
|
+
_globals['_GETQUEUEACTIVITYRESPONSE']._serialized_start=3435
|
|
98
|
+
_globals['_GETQUEUEACTIVITYRESPONSE']._serialized_end=3488
|
|
99
|
+
_globals['_GETQUEUESTATSREQUEST']._serialized_start=3490
|
|
100
|
+
_globals['_GETQUEUESTATSREQUEST']._serialized_end=3590
|
|
101
|
+
_globals['_GETQUEUESTATSRESPONSE']._serialized_start=3593
|
|
102
|
+
_globals['_GETQUEUESTATSRESPONSE']._serialized_end=3910
|
|
103
|
+
_globals['_RETRYTASKREQUEST']._serialized_start=3912
|
|
104
|
+
_globals['_RETRYTASKREQUEST']._serialized_end=4036
|
|
105
|
+
_globals['_RETRYTASKRESPONSE']._serialized_start=4038
|
|
106
|
+
_globals['_RETRYTASKRESPONSE']._serialized_end=4087
|
|
107
|
+
_globals['_CLAIMREQUEST']._serialized_start=4090
|
|
108
|
+
_globals['_CLAIMREQUEST']._serialized_end=4316
|
|
109
|
+
_globals['_CLAIMRESPONSE']._serialized_start=4318
|
|
110
|
+
_globals['_CLAIMRESPONSE']._serialized_end=4370
|
|
111
|
+
_globals['_LEASEREF']._serialized_start=4372
|
|
112
|
+
_globals['_LEASEREF']._serialized_end=4437
|
|
113
|
+
_globals['_ACKREQUEST']._serialized_start=4439
|
|
114
|
+
_globals['_ACKREQUEST']._serialized_end=4529
|
|
115
|
+
_globals['_ACKRESPONSE']._serialized_start=4531
|
|
116
|
+
_globals['_ACKRESPONSE']._serialized_end=4544
|
|
117
|
+
_globals['_NACKREQUEST']._serialized_start=4547
|
|
118
|
+
_globals['_NACKREQUEST']._serialized_end=4710
|
|
119
|
+
_globals['_NACKRESPONSE']._serialized_start=4712
|
|
120
|
+
_globals['_NACKRESPONSE']._serialized_end=4756
|
|
121
|
+
_globals['_REJECTREQUEST']._serialized_start=4758
|
|
122
|
+
_globals['_REJECTREQUEST']._serialized_end=4866
|
|
123
|
+
_globals['_REJECTRESPONSE']._serialized_start=4868
|
|
124
|
+
_globals['_REJECTRESPONSE']._serialized_end=4914
|
|
125
|
+
_globals['_EXTENDLEASEREQUEST']._serialized_start=4917
|
|
126
|
+
_globals['_EXTENDLEASEREQUEST']._serialized_end=5061
|
|
127
|
+
_globals['_EXTENDLEASERESPONSE']._serialized_start=5063
|
|
128
|
+
_globals['_EXTENDLEASERESPONSE']._serialized_end=5116
|
|
129
|
+
_globals['_REPORTPROGRESSREQUEST']._serialized_start=5119
|
|
130
|
+
_globals['_REPORTPROGRESSREQUEST']._serialized_end=5269
|
|
131
|
+
_globals['_REPORTPROGRESSRESPONSE']._serialized_start=5271
|
|
132
|
+
_globals['_REPORTPROGRESSRESPONSE']._serialized_end=5295
|
|
133
|
+
_globals['_WORKERREGISTRATION']._serialized_start=5298
|
|
134
|
+
_globals['_WORKERREGISTRATION']._serialized_end=5520
|
|
135
|
+
_globals['_CREDITUPDATE']._serialized_start=5522
|
|
136
|
+
_globals['_CREDITUPDATE']._serialized_end=5611
|
|
137
|
+
_globals['_WORKERDRAIN']._serialized_start=5613
|
|
138
|
+
_globals['_WORKERDRAIN']._serialized_end=5641
|
|
139
|
+
_globals['_WORKERREGISTERED']._serialized_start=5644
|
|
140
|
+
_globals['_WORKERREGISTERED']._serialized_end=5786
|
|
141
|
+
_globals['_WORKREQUEST']._serialized_start=5789
|
|
142
|
+
_globals['_WORKREQUEST']._serialized_end=6188
|
|
143
|
+
_globals['_WORKRESULT']._serialized_start=6190
|
|
144
|
+
_globals['_WORKRESULT']._serialized_end=6260
|
|
145
|
+
_globals['_WORKRESPONSE']._serialized_start=6263
|
|
146
|
+
_globals['_WORKRESPONSE']._serialized_end=6462
|
|
147
|
+
_globals['_PROBEQUEUEREQUEST']._serialized_start=6464
|
|
148
|
+
_globals['_PROBEQUEUEREQUEST']._serialized_end=6561
|
|
149
|
+
_globals['_PROBEQUEUERESPONSE']._serialized_start=6563
|
|
150
|
+
_globals['_PROBEQUEUERESPONSE']._serialized_end=6611
|
|
151
|
+
_globals['_QUEUESERVICE']._serialized_start=7218
|
|
152
|
+
_globals['_QUEUESERVICE']._serialized_end=8434
|
|
141
153
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -6,7 +6,7 @@ import warnings
|
|
|
6
6
|
|
|
7
7
|
from ringo_task_queue._proto.ringo.v1 import queue_pb2 as ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2
|
|
8
8
|
|
|
9
|
-
GRPC_GENERATED_VERSION = '1.
|
|
9
|
+
GRPC_GENERATED_VERSION = '1.71.0'
|
|
10
10
|
GRPC_VERSION = grpc.__version__
|
|
11
11
|
_version_not_supported = False
|
|
12
12
|
|
|
@@ -19,14 +19,14 @@ except ImportError:
|
|
|
19
19
|
if _version_not_supported:
|
|
20
20
|
raise RuntimeError(
|
|
21
21
|
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
22
|
-
+ ' but the generated code in ringo_task_queue/_proto/ringo/v1/queue_pb2_grpc.py depends on'
|
|
22
|
+
+ f' but the generated code in ringo_task_queue/_proto/ringo/v1/queue_pb2_grpc.py depends on'
|
|
23
23
|
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
24
24
|
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
25
25
|
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class QueueServiceStub:
|
|
29
|
+
class QueueServiceStub(object):
|
|
30
30
|
"""QueueService is the versioned data plane used by every SDK.
|
|
31
31
|
"""
|
|
32
32
|
|
|
@@ -56,11 +56,21 @@ class QueueServiceStub:
|
|
|
56
56
|
request_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskRequest.SerializeToString,
|
|
57
57
|
response_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskResponse.FromString,
|
|
58
58
|
_registered_method=True)
|
|
59
|
+
self.GetTaskAttempts = channel.unary_unary(
|
|
60
|
+
'/ringo.v1.QueueService/GetTaskAttempts',
|
|
61
|
+
request_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskAttemptsRequest.SerializeToString,
|
|
62
|
+
response_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskAttemptsResponse.FromString,
|
|
63
|
+
_registered_method=True)
|
|
59
64
|
self.GetQueueActivity = channel.unary_unary(
|
|
60
65
|
'/ringo.v1.QueueService/GetQueueActivity',
|
|
61
66
|
request_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueActivityRequest.SerializeToString,
|
|
62
67
|
response_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueActivityResponse.FromString,
|
|
63
68
|
_registered_method=True)
|
|
69
|
+
self.GetQueueStats = channel.unary_unary(
|
|
70
|
+
'/ringo.v1.QueueService/GetQueueStats',
|
|
71
|
+
request_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueStatsRequest.SerializeToString,
|
|
72
|
+
response_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueStatsResponse.FromString,
|
|
73
|
+
_registered_method=True)
|
|
64
74
|
self.RetryTask = channel.unary_unary(
|
|
65
75
|
'/ringo.v1.QueueService/RetryTask',
|
|
66
76
|
request_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.RetryTaskRequest.SerializeToString,
|
|
@@ -106,9 +116,14 @@ class QueueServiceStub:
|
|
|
106
116
|
request_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.AttachLocalRequest.SerializeToString,
|
|
107
117
|
response_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.AttachLocalResponse.FromString,
|
|
108
118
|
_registered_method=True)
|
|
119
|
+
self.ProbeQueue = channel.unary_unary(
|
|
120
|
+
'/ringo.v1.QueueService/ProbeQueue',
|
|
121
|
+
request_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.ProbeQueueRequest.SerializeToString,
|
|
122
|
+
response_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.ProbeQueueResponse.FromString,
|
|
123
|
+
_registered_method=True)
|
|
109
124
|
|
|
110
125
|
|
|
111
|
-
class QueueServiceServicer:
|
|
126
|
+
class QueueServiceServicer(object):
|
|
112
127
|
"""QueueService is the versioned data plane used by every SDK.
|
|
113
128
|
"""
|
|
114
129
|
|
|
@@ -136,6 +151,13 @@ class QueueServiceServicer:
|
|
|
136
151
|
context.set_details('Method not implemented!')
|
|
137
152
|
raise NotImplementedError('Method not implemented!')
|
|
138
153
|
|
|
154
|
+
def GetTaskAttempts(self, request, context):
|
|
155
|
+
"""Protocol minor 5: read-only, bounded pagination of durable attempt history.
|
|
156
|
+
"""
|
|
157
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
158
|
+
context.set_details('Method not implemented!')
|
|
159
|
+
raise NotImplementedError('Method not implemented!')
|
|
160
|
+
|
|
139
161
|
def GetQueueActivity(self, request, context):
|
|
140
162
|
"""GetQueueActivity returns a point-in-time queue/type-scope activity count.
|
|
141
163
|
It is read-only and does not seal the queue or promise durable completion.
|
|
@@ -144,6 +166,13 @@ class QueueServiceServicer:
|
|
|
144
166
|
context.set_details('Method not implemented!')
|
|
145
167
|
raise NotImplementedError('Method not implemented!')
|
|
146
168
|
|
|
169
|
+
def GetQueueStats(self, request, context):
|
|
170
|
+
"""GetQueueStats returns a read-only point-in-time task count snapshot.
|
|
171
|
+
"""
|
|
172
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
173
|
+
context.set_details('Method not implemented!')
|
|
174
|
+
raise NotImplementedError('Method not implemented!')
|
|
175
|
+
|
|
147
176
|
def RetryTask(self, request, context):
|
|
148
177
|
"""Missing associated documentation comment in .proto file."""
|
|
149
178
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
@@ -200,6 +229,14 @@ class QueueServiceServicer:
|
|
|
200
229
|
context.set_details('Method not implemented!')
|
|
201
230
|
raise NotImplementedError('Method not implemented!')
|
|
202
231
|
|
|
232
|
+
def ProbeQueue(self, request, context):
|
|
233
|
+
"""Protocol minor 7: read-only existence of currently eligible queue/type work.
|
|
234
|
+
This neither reserves work nor guarantees dispatch to a particular Worker.
|
|
235
|
+
"""
|
|
236
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
237
|
+
context.set_details('Method not implemented!')
|
|
238
|
+
raise NotImplementedError('Method not implemented!')
|
|
239
|
+
|
|
203
240
|
|
|
204
241
|
def add_QueueServiceServicer_to_server(servicer, server):
|
|
205
242
|
rpc_method_handlers = {
|
|
@@ -223,11 +260,21 @@ def add_QueueServiceServicer_to_server(servicer, server):
|
|
|
223
260
|
request_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskRequest.FromString,
|
|
224
261
|
response_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskResponse.SerializeToString,
|
|
225
262
|
),
|
|
263
|
+
'GetTaskAttempts': grpc.unary_unary_rpc_method_handler(
|
|
264
|
+
servicer.GetTaskAttempts,
|
|
265
|
+
request_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskAttemptsRequest.FromString,
|
|
266
|
+
response_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskAttemptsResponse.SerializeToString,
|
|
267
|
+
),
|
|
226
268
|
'GetQueueActivity': grpc.unary_unary_rpc_method_handler(
|
|
227
269
|
servicer.GetQueueActivity,
|
|
228
270
|
request_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueActivityRequest.FromString,
|
|
229
271
|
response_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueActivityResponse.SerializeToString,
|
|
230
272
|
),
|
|
273
|
+
'GetQueueStats': grpc.unary_unary_rpc_method_handler(
|
|
274
|
+
servicer.GetQueueStats,
|
|
275
|
+
request_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueStatsRequest.FromString,
|
|
276
|
+
response_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueStatsResponse.SerializeToString,
|
|
277
|
+
),
|
|
231
278
|
'RetryTask': grpc.unary_unary_rpc_method_handler(
|
|
232
279
|
servicer.RetryTask,
|
|
233
280
|
request_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.RetryTaskRequest.FromString,
|
|
@@ -273,6 +320,11 @@ def add_QueueServiceServicer_to_server(servicer, server):
|
|
|
273
320
|
request_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.AttachLocalRequest.FromString,
|
|
274
321
|
response_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.AttachLocalResponse.SerializeToString,
|
|
275
322
|
),
|
|
323
|
+
'ProbeQueue': grpc.unary_unary_rpc_method_handler(
|
|
324
|
+
servicer.ProbeQueue,
|
|
325
|
+
request_deserializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.ProbeQueueRequest.FromString,
|
|
326
|
+
response_serializer=ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.ProbeQueueResponse.SerializeToString,
|
|
327
|
+
),
|
|
276
328
|
}
|
|
277
329
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
278
330
|
'ringo.v1.QueueService', rpc_method_handlers)
|
|
@@ -281,7 +333,7 @@ def add_QueueServiceServicer_to_server(servicer, server):
|
|
|
281
333
|
|
|
282
334
|
|
|
283
335
|
# This class is part of an EXPERIMENTAL API.
|
|
284
|
-
class QueueService:
|
|
336
|
+
class QueueService(object):
|
|
285
337
|
"""QueueService is the versioned data plane used by every SDK.
|
|
286
338
|
"""
|
|
287
339
|
|
|
@@ -393,6 +445,33 @@ class QueueService:
|
|
|
393
445
|
metadata,
|
|
394
446
|
_registered_method=True)
|
|
395
447
|
|
|
448
|
+
@staticmethod
|
|
449
|
+
def GetTaskAttempts(request,
|
|
450
|
+
target,
|
|
451
|
+
options=(),
|
|
452
|
+
channel_credentials=None,
|
|
453
|
+
call_credentials=None,
|
|
454
|
+
insecure=False,
|
|
455
|
+
compression=None,
|
|
456
|
+
wait_for_ready=None,
|
|
457
|
+
timeout=None,
|
|
458
|
+
metadata=None):
|
|
459
|
+
return grpc.experimental.unary_unary(
|
|
460
|
+
request,
|
|
461
|
+
target,
|
|
462
|
+
'/ringo.v1.QueueService/GetTaskAttempts',
|
|
463
|
+
ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskAttemptsRequest.SerializeToString,
|
|
464
|
+
ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetTaskAttemptsResponse.FromString,
|
|
465
|
+
options,
|
|
466
|
+
channel_credentials,
|
|
467
|
+
insecure,
|
|
468
|
+
call_credentials,
|
|
469
|
+
compression,
|
|
470
|
+
wait_for_ready,
|
|
471
|
+
timeout,
|
|
472
|
+
metadata,
|
|
473
|
+
_registered_method=True)
|
|
474
|
+
|
|
396
475
|
@staticmethod
|
|
397
476
|
def GetQueueActivity(request,
|
|
398
477
|
target,
|
|
@@ -420,6 +499,33 @@ class QueueService:
|
|
|
420
499
|
metadata,
|
|
421
500
|
_registered_method=True)
|
|
422
501
|
|
|
502
|
+
@staticmethod
|
|
503
|
+
def GetQueueStats(request,
|
|
504
|
+
target,
|
|
505
|
+
options=(),
|
|
506
|
+
channel_credentials=None,
|
|
507
|
+
call_credentials=None,
|
|
508
|
+
insecure=False,
|
|
509
|
+
compression=None,
|
|
510
|
+
wait_for_ready=None,
|
|
511
|
+
timeout=None,
|
|
512
|
+
metadata=None):
|
|
513
|
+
return grpc.experimental.unary_unary(
|
|
514
|
+
request,
|
|
515
|
+
target,
|
|
516
|
+
'/ringo.v1.QueueService/GetQueueStats',
|
|
517
|
+
ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueStatsRequest.SerializeToString,
|
|
518
|
+
ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.GetQueueStatsResponse.FromString,
|
|
519
|
+
options,
|
|
520
|
+
channel_credentials,
|
|
521
|
+
insecure,
|
|
522
|
+
call_credentials,
|
|
523
|
+
compression,
|
|
524
|
+
wait_for_ready,
|
|
525
|
+
timeout,
|
|
526
|
+
metadata,
|
|
527
|
+
_registered_method=True)
|
|
528
|
+
|
|
423
529
|
@staticmethod
|
|
424
530
|
def RetryTask(request,
|
|
425
531
|
target,
|
|
@@ -662,3 +768,30 @@ class QueueService:
|
|
|
662
768
|
timeout,
|
|
663
769
|
metadata,
|
|
664
770
|
_registered_method=True)
|
|
771
|
+
|
|
772
|
+
@staticmethod
|
|
773
|
+
def ProbeQueue(request,
|
|
774
|
+
target,
|
|
775
|
+
options=(),
|
|
776
|
+
channel_credentials=None,
|
|
777
|
+
call_credentials=None,
|
|
778
|
+
insecure=False,
|
|
779
|
+
compression=None,
|
|
780
|
+
wait_for_ready=None,
|
|
781
|
+
timeout=None,
|
|
782
|
+
metadata=None):
|
|
783
|
+
return grpc.experimental.unary_unary(
|
|
784
|
+
request,
|
|
785
|
+
target,
|
|
786
|
+
'/ringo.v1.QueueService/ProbeQueue',
|
|
787
|
+
ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.ProbeQueueRequest.SerializeToString,
|
|
788
|
+
ringo__task__queue_dot___proto_dot_ringo_dot_v1_dot_queue__pb2.ProbeQueueResponse.FromString,
|
|
789
|
+
options,
|
|
790
|
+
channel_credentials,
|
|
791
|
+
insecure,
|
|
792
|
+
call_credentials,
|
|
793
|
+
compression,
|
|
794
|
+
wait_for_ready,
|
|
795
|
+
timeout,
|
|
796
|
+
metadata,
|
|
797
|
+
_registered_method=True)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"""Private subprocess bootstrap. Use the public ``supervise`` function."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import importlib
|
|
6
|
+
import inspect
|
|
7
|
+
import os
|
|
8
|
+
import socket
|
|
9
|
+
import sys
|
|
10
|
+
import traceback
|
|
11
|
+
|
|
12
|
+
from ._supervisor_ipc import Channel
|
|
13
|
+
from ._supervisor_policy import SupervisorPolicy, TaskTimeouts
|
|
14
|
+
from ._supervisor_runtime import ChildRuntime
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _load(entrypoint: str):
|
|
18
|
+
module_name, attribute = entrypoint.split(":", 1)
|
|
19
|
+
result = importlib.import_module(module_name)
|
|
20
|
+
for name in attribute.split("."):
|
|
21
|
+
result = getattr(result, name)
|
|
22
|
+
if not callable(result):
|
|
23
|
+
raise TypeError("supervisor entrypoint must be callable")
|
|
24
|
+
inspect.signature(result).bind()
|
|
25
|
+
return result
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def main() -> int:
|
|
29
|
+
if len(sys.argv) != 2:
|
|
30
|
+
print("This is a private supervisor bootstrap.", file=sys.stderr)
|
|
31
|
+
return 78
|
|
32
|
+
# Never pass the local channel capability on a command line or leave it in
|
|
33
|
+
# the environment inherited by browsers/application subprocesses.
|
|
34
|
+
port = int(os.environ.pop("RINGO_SUPERVISOR_PORT"))
|
|
35
|
+
token = os.environ.pop("RINGO_SUPERVISOR_TOKEN")
|
|
36
|
+
generation = os.environ.pop("RINGO_SUPERVISOR_GENERATION")
|
|
37
|
+
connection = socket.create_connection(("127.0.0.1", port), timeout=30)
|
|
38
|
+
connection.settimeout(None)
|
|
39
|
+
channel = Channel(connection)
|
|
40
|
+
channel.send({"kind": "hello", "token": token, "generation": generation})
|
|
41
|
+
config = channel.receive(timeout=30)
|
|
42
|
+
if (
|
|
43
|
+
config is None
|
|
44
|
+
or config.get("kind") != "configure"
|
|
45
|
+
or config.get("generation") != generation
|
|
46
|
+
):
|
|
47
|
+
channel.close()
|
|
48
|
+
return 78
|
|
49
|
+
# The parent has assigned the Job before allowing *any application import*.
|
|
50
|
+
# Only shared-local's explicit launch path is allowed to break away.
|
|
51
|
+
if config.get("windows_job"):
|
|
52
|
+
os.environ["RINGO_SUPERVISOR_JOB"] = "1"
|
|
53
|
+
else:
|
|
54
|
+
os.environ.pop("RINGO_SUPERVISOR_JOB", None)
|
|
55
|
+
runtime = ChildRuntime(
|
|
56
|
+
channel,
|
|
57
|
+
SupervisorPolicy._from_wire(config["policy"]),
|
|
58
|
+
TaskTimeouts._from_wire(config["task_timeouts"]),
|
|
59
|
+
)
|
|
60
|
+
runtime.start()
|
|
61
|
+
ready = False
|
|
62
|
+
try:
|
|
63
|
+
try:
|
|
64
|
+
function = _load(sys.argv[1])
|
|
65
|
+
except Exception: # noqa: BLE001 - Arbitrary application imports fail closed.
|
|
66
|
+
traceback.print_exc()
|
|
67
|
+
channel.send({"kind": "fatal", "reason": "invalid_entrypoint"})
|
|
68
|
+
return 78
|
|
69
|
+
channel.send({"kind": "ready"})
|
|
70
|
+
ready = True
|
|
71
|
+
return runtime.invoke(function)
|
|
72
|
+
except SystemExit as exc:
|
|
73
|
+
if not ready:
|
|
74
|
+
channel.send({"kind": "fatal", "reason": "entrypoint_import_exited"})
|
|
75
|
+
return 78
|
|
76
|
+
code = exc.code if isinstance(exc.code, int) else (0 if exc.code is None else 1)
|
|
77
|
+
channel.send({"kind": "entrypoint_done", "exit_code": code})
|
|
78
|
+
return code
|
|
79
|
+
except BaseException: # noqa: BLE001 - Final subprocess/application boundary.
|
|
80
|
+
traceback.print_exc()
|
|
81
|
+
try:
|
|
82
|
+
channel.send({"kind": "entrypoint_failed"})
|
|
83
|
+
except OSError:
|
|
84
|
+
pass
|
|
85
|
+
return 1
|
|
86
|
+
finally:
|
|
87
|
+
runtime.close()
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
if __name__ == "__main__":
|
|
91
|
+
raise SystemExit(main())
|