sutro 0.1.12__tar.gz → 0.1.13__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.

Potentially problematic release.


This version of sutro might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sutro
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: Sutro Python SDK
5
5
  Project-URL: Homepage, https://sutro.sh
6
6
  Project-URL: Documentation, https://docs.sutro.sh
@@ -9,7 +9,7 @@ installer = "uv"
9
9
 
10
10
  [project]
11
11
  name = "sutro"
12
- version = "0.1.12"
12
+ version = "0.1.13"
13
13
  description = "Sutro Python SDK"
14
14
  readme = "README.md"
15
15
  requires-python = ">=3.10"
@@ -437,8 +437,10 @@ class Sutro:
437
437
  if not stop_event.is_set(): # Only log if we weren't stopping anyway
438
438
  print(f"Heartbeat failed for job {job_id}: {e}")
439
439
 
440
- # Use time.sleep instead of asyncio.sleep since this is synchronous
441
- time.sleep(self.HEARTBEAT_INTERVAL_SECONDS)
440
+ for _ in range(self.HEARTBEAT_INTERVAL_SECONDS):
441
+ if stop_event.is_set():
442
+ break
443
+ time.sleep(1)
442
444
 
443
445
  @contextmanager
444
446
  def stream_heartbeat_session(self, job_id: str, session_token: str) -> Generator[requests.Session, None, None]:
@@ -449,7 +451,7 @@ class Sutro:
449
451
  # Run this concurrently in a thread so we can not block main SDK path/behavior
450
452
  # but still run heartbeat requests
451
453
  with ThreadPoolExecutor(max_workers=1) as executor:
452
- future = executor.submit(
454
+ executor.submit(
453
455
  self.start_heartbeat,
454
456
  job_id,
455
457
  session_token,
@@ -462,7 +464,6 @@ class Sutro:
462
464
  finally:
463
465
  # Signal stop and cleanup
464
466
  stop_heartbeat.set()
465
- future.result() # Wait for heartbeat to finish
466
467
  self.unregister_stream_listener(job_id, session_token)
467
468
  session.close()
468
469
 
File without changes
File without changes
File without changes
File without changes
File without changes