hatchet-sdk 1.15.0__py3-none-any.whl → 1.15.2__py3-none-any.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.

Potentially problematic release.


This version of hatchet-sdk might be problematic. Click here for more details.

@@ -1,3 +1,6 @@
1
+ import platform
2
+ from importlib.metadata import version
3
+ from sys import version_info
1
4
  from typing import cast
2
5
 
3
6
  import grpc.aio
@@ -11,6 +14,7 @@ from hatchet_sdk.clients.rest.tenacity_utils import tenacity_retry
11
14
  from hatchet_sdk.config import ClientConfig
12
15
  from hatchet_sdk.connection import new_conn
13
16
  from hatchet_sdk.contracts.dispatcher_pb2 import (
17
+ SDKS,
14
18
  STEP_EVENT_TYPE_COMPLETED,
15
19
  STEP_EVENT_TYPE_FAILED,
16
20
  ActionEventResponse,
@@ -19,6 +23,7 @@ from hatchet_sdk.contracts.dispatcher_pb2 import (
19
23
  OverridesData,
20
24
  RefreshTimeoutRequest,
21
25
  ReleaseSlotRequest,
26
+ RuntimeInfo,
22
27
  StepActionEvent,
23
28
  StepActionEventType,
24
29
  UpsertWorkerLabelsRequest,
@@ -72,6 +77,12 @@ class DispatcherClient:
72
77
  services=req.services,
73
78
  maxRuns=req.slots,
74
79
  labels=req.labels,
80
+ runtimeInfo=RuntimeInfo(
81
+ sdkVersion=version("hatchet_sdk"),
82
+ language=SDKS.PYTHON,
83
+ languageVersion=f"{version_info.major}.{version_info.minor}.{version_info.micro}",
84
+ os=platform.system().lower(),
85
+ ),
75
86
  ),
76
87
  timeout=DEFAULT_REGISTER_TIMEOUT,
77
88
  metadata=get_metadata(self.token),
@@ -67,11 +67,13 @@ class AsyncLogSender:
67
67
  break
68
68
 
69
69
  try:
70
- self.event_client.log(
71
- message=record.message, step_run_id=record.step_run_id
70
+ await asyncio.to_thread(
71
+ self.event_client.log,
72
+ message=record.message,
73
+ step_run_id=record.step_run_id,
72
74
  )
73
- except Exception as e:
74
- logger.error(f"Error logging: {e}")
75
+ except Exception:
76
+ logger.exception("Failed to send log to Hatchet")
75
77
 
76
78
  def publish(self, record: LogRecord | STOP_LOOP_TYPE) -> None:
77
79
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hatchet-sdk
3
- Version: 1.15.0
3
+ Version: 1.15.2
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Alexander Belanger
@@ -2,7 +2,7 @@ hatchet_sdk/__init__.py,sha256=LdT8xJ7-95gwksRZuCzuKDM5bfLx8uW8gXGPL7VMqwc,10743
2
2
  hatchet_sdk/client.py,sha256=OXb2hOJ5p7pY5QMlM4cydb4aGyf6bDdbyWQjPMVCe64,2413
3
3
  hatchet_sdk/clients/admin.py,sha256=t8GXhjMiFp9iL0ofISNxSOKlfwaOTX2iQbZfz1G0pHU,16936
4
4
  hatchet_sdk/clients/dispatcher/action_listener.py,sha256=tFknXH9iSP0OFYYVcKeDZVrcDNIz00ZQVTxSbHpbKhI,13863
5
- hatchet_sdk/clients/dispatcher/dispatcher.py,sha256=5qyvLqiCJeW0n9rzqGUNasW95ATywcq5dJrT_ePKmUw,8114
5
+ hatchet_sdk/clients/dispatcher/dispatcher.py,sha256=1d4_4DYdFskqXjmHPHgZ-jBx1l9fQ1e0SMIweDL0VsE,8559
6
6
  hatchet_sdk/clients/event_ts.py,sha256=d9NTfjWVk84QMB5XTWkDZ2UfsIIn5ytAEn6S5fhpxss,2121
7
7
  hatchet_sdk/clients/events.py,sha256=wE36_Wyb8BLywpuc8epRj7ZZDN9UCmztn6g3wdgRivM,8849
8
8
  hatchet_sdk/clients/listeners/durable_event_listener.py,sha256=55WbVQpm65ccVSQtqz-Z_4EI8Gig-7MzH5F9Arh-rb0,4166
@@ -511,10 +511,10 @@ hatchet_sdk/worker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
511
511
  hatchet_sdk/worker/action_listener_process.py,sha256=Xzzn1dDFJrqnC9HBsh3fYI8lfpOD4Ecze47qmm_XUWE,12923
512
512
  hatchet_sdk/worker/runner/run_loop_manager.py,sha256=GeILClNXaDbsjXCQb0bBdgeyAwZGem2JdaH0t6wz__I,4053
513
513
  hatchet_sdk/worker/runner/runner.py,sha256=Btz7wd0DQ-5aPEZLN3T5X5__8DjuxN6H4yQEVX0eZiI,21678
514
- hatchet_sdk/worker/runner/utils/capture_logs.py,sha256=DKw6boqVsSCM1XvBWYuc833MZxCdSpMxg3l4aAqKPyw,3465
514
+ hatchet_sdk/worker/runner/utils/capture_logs.py,sha256=nJb67Hq-RGiuj0J2eWO-6QxY6ERfl2N3lvVhbj3YDqE,3540
515
515
  hatchet_sdk/worker/worker.py,sha256=nDuRo_LishRuOCTnDonc7G7qeOoW93nRHGd-fQOE_bs,16541
516
516
  hatchet_sdk/workflow_run.py,sha256=KcylcqRwKADtnzOTjoiVr1vdr7qTZFtDeD5aRS6A4Y8,2823
517
- hatchet_sdk-1.15.0.dist-info/METADATA,sha256=h9GjdEJsJudw7moBNpVj-uyvJzqlT7aXBcW4NsovLmE,3636
518
- hatchet_sdk-1.15.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
519
- hatchet_sdk-1.15.0.dist-info/entry_points.txt,sha256=Un_76pcLse-ZGBlwebhQpnTPyQrripeHW8J7qmEpGOk,1400
520
- hatchet_sdk-1.15.0.dist-info/RECORD,,
517
+ hatchet_sdk-1.15.2.dist-info/METADATA,sha256=tD9g4uoBnymLMT14UM4RFBhuisTaa1aJxwlXvqHY8fo,3636
518
+ hatchet_sdk-1.15.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
519
+ hatchet_sdk-1.15.2.dist-info/entry_points.txt,sha256=Un_76pcLse-ZGBlwebhQpnTPyQrripeHW8J7qmEpGOk,1400
520
+ hatchet_sdk-1.15.2.dist-info/RECORD,,