Grade 4
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-11-27 21:55:47 +03:00
parent f6882a77b4
commit b6c71fd96a
67 changed files with 3770 additions and 595 deletions
+4 -2
View File
@@ -32,7 +32,9 @@ def now():
def broker():
return Redis.from_url(os.getenv('BROKER_URL', 'redis://broker:6379/0'),
decode_responses=True, socket_connect_timeout=2, socket_timeout=5)
decode_responses=True, socket_connect_timeout=2, socket_timeout=5,
ssl_ca_certs='/run/identity/ca.crt', ssl_check_hostname=True,
ssl_certfile='/run/identity/tls.crt', ssl_keyfile='/run/identity/tls.key')
def ensure_group(client):
@@ -83,7 +85,7 @@ def dispatch_once(sessions, client):
continue
if job.published_at is None:
with otel.span('attachment-jobs publish', kind=otel.SpanKind.PRODUCER,
context=otel.propagator.extract(job.trace_context), attributes={
context=otel.extract(job.trace_context), attributes={
'messaging.system': 'redis', 'messaging.destination.name': STREAM,
'messaging.operation.type': 'publish', 'job.attempt': job.attempt + 1}):
client.xadd(STREAM, {'job': json.dumps({**envelope(job), **otel.carrier()})})