dbos 1.14.0a6__py3-none-any.whl → 1.14.0a8__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.
dbos/_debouncer.py CHANGED
@@ -232,7 +232,10 @@ class Debouncer(Generic[P, R]):
232
232
  while True:
233
233
  try:
234
234
  # Attempt to enqueue a debouncer for this workflow.
235
- with SetEnqueueOptions(deduplication_id=self.debounce_key):
235
+ deduplication_id = (
236
+ f"{self.options['workflow_name']}-{self.debounce_key}"
237
+ )
238
+ with SetEnqueueOptions(deduplication_id=deduplication_id):
236
239
  with SetWorkflowTimeout(None):
237
240
  internal_queue.enqueue(
238
241
  debouncer_workflow,
@@ -249,7 +252,7 @@ class Debouncer(Generic[P, R]):
249
252
  def get_deduplicated_workflow() -> Optional[str]:
250
253
  return dbos._sys_db.get_deduplicated_workflow(
251
254
  queue_name=internal_queue.name,
252
- deduplication_id=self.debounce_key,
255
+ deduplication_id=deduplication_id,
253
256
  )
254
257
 
255
258
  dedup_wfid = dbos._sys_db.call_function_as_step(
@@ -333,10 +336,13 @@ class DebouncerClient:
333
336
  while True:
334
337
  try:
335
338
  # Attempt to enqueue a debouncer for this workflow.
339
+ deduplication_id = (
340
+ f"{self.debouncer_options['workflow_name']}-{self.debounce_key}"
341
+ )
336
342
  debouncer_options: EnqueueOptions = {
337
343
  "workflow_name": DEBOUNCER_WORKFLOW_NAME,
338
344
  "queue_name": INTERNAL_QUEUE_NAME,
339
- "deduplication_id": self.debounce_key,
345
+ "deduplication_id": deduplication_id,
340
346
  }
341
347
  self.client.enqueue(
342
348
  debouncer_options,
@@ -353,7 +359,7 @@ class DebouncerClient:
353
359
  # If there is already a debouncer, send a message to it.
354
360
  dedup_wfid = self.client._sys_db.get_deduplicated_workflow(
355
361
  queue_name=INTERNAL_QUEUE_NAME,
356
- deduplication_id=self.debounce_key,
362
+ deduplication_id=deduplication_id,
357
363
  )
358
364
  if dedup_wfid is None:
359
365
  continue
dbos/_sys_db.py CHANGED
@@ -1934,8 +1934,13 @@ class SystemDatabase(ABC):
1934
1934
  )
1935
1935
  if self._debug_mode and recorded_output is None:
1936
1936
  raise Exception(
1937
- "called set_event in debug mode without a previous execution"
1937
+ "called writeStream in debug mode without a previous execution"
1938
1938
  )
1939
+ if recorded_output is not None:
1940
+ dbos_logger.debug(
1941
+ f"Replaying writeStream, id: {function_id}, key: {key}"
1942
+ )
1943
+ return
1939
1944
  # Find the maximum offset for this workflow_uuid and key combination
1940
1945
  max_offset_result = c.execute(
1941
1946
  sa.select(sa.func.max(SystemSchema.streams.c.offset)).where(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 1.14.0a6
3
+ Version: 1.14.0a8
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
- dbos-1.14.0a6.dist-info/METADATA,sha256=SkLS0HlCdwrO5LyiXP_ls-yAZNRlnUJkFWSUbS4qiqM,13268
2
- dbos-1.14.0a6.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- dbos-1.14.0a6.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
- dbos-1.14.0a6.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
1
+ dbos-1.14.0a8.dist-info/METADATA,sha256=sgYRWoRyfRodZIXnIdoeikYwBn9S7n08Ul4_zoqZAX8,13268
2
+ dbos-1.14.0a8.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ dbos-1.14.0a8.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
+ dbos-1.14.0a8.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
5
  dbos/__init__.py,sha256=pT4BuNLDCrIQX27vQG8NlfxX6PZRU7r9miq4thJTszU,982
6
6
  dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
7
7
  dbos/_admin_server.py,sha256=e8ELhcDWqR3_PNobnNgUvLGh5lzZq0yFSF6dvtzoQRI,16267
@@ -32,7 +32,7 @@ dbos/_core.py,sha256=plF80l5Rh_bBpy5PFZy3p3ux6agmYkUgZq8e36i68F4,50443
32
32
  dbos/_croniter.py,sha256=XHAyUyibs_59sJQfSNWkP7rqQY6_XrlfuuCxk4jYqek,47559
33
33
  dbos/_dbos.py,sha256=AgkcE9YSC9KWsDUNfEhdbkfR9NjT0seZDAOunb3n61w,58201
34
34
  dbos/_dbos_config.py,sha256=_26ktif8qAZW4Ujg6dZfLkYO7dE4CI8b3IQbw_5YkpA,25710
35
- dbos/_debouncer.py,sha256=zsfGoFCNs2DnCTSkv6pDgNspzOnqsoquSlHgmi2nbXo,15124
35
+ dbos/_debouncer.py,sha256=nUBzPbRppVVh6I6o0c70QS2wrWZISIonivguswE63jE,15390
36
36
  dbos/_debug.py,sha256=99j2SChWmCPAlZoDmjsJGe77tpU2LEa8E2TtLAnnh7o,1831
37
37
  dbos/_docker_pg_helper.py,sha256=tLJXWqZ4S-ExcaPnxg_i6cVxL6ZxrYlZjaGsklY-s2I,6115
38
38
  dbos/_error.py,sha256=GwO0Ng4d4iB52brY09-Ss6Cz_V28Xc0D0cRCzZ6XmNM,8688
@@ -53,7 +53,7 @@ dbos/_schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
53
  dbos/_schemas/application_database.py,sha256=SypAS9l9EsaBHFn9FR8jmnqt01M74d9AF1AMa4m2hhI,1040
54
54
  dbos/_schemas/system_database.py,sha256=-dAKk-_Y3vzbpLT4ei-sIrBQgFyQiwPj1enZb1TYc8I,4943
55
55
  dbos/_serialization.py,sha256=VOMpwuJ6IskOUEegFDPqjIoV5PoBWfH9BgtnuI1jLok,3906
56
- dbos/_sys_db.py,sha256=fvrO3F-tOh8zgfxTNbnwksWLVdXYZVQJceIp6ZJOOlw,82838
56
+ dbos/_sys_db.py,sha256=SspVk-wYmE6xZLuyYQUclwh_AMjnkDXcog5g5WmYn7c,83036
57
57
  dbos/_sys_db_postgres.py,sha256=WcG-f1CUzUNBGEOjqKEp6DDraN63jTnJ6CAfieCcxOs,7555
58
58
  dbos/_sys_db_sqlite.py,sha256=xT9l-czMhLmfuu5UcnBzAyUxSFgzt3XtEWx9t_D8mZs,7361
59
59
  dbos/_templates/dbos-db-starter/README.md,sha256=GhxhBj42wjTt1fWEtwNriHbJuKb66Vzu89G4pxNHw2g,930
@@ -76,4 +76,4 @@ dbos/cli/migration.py,sha256=5GiyagLZkyVvDz3StYxtFdkFoKFCmh6eSXjzsIGhZ_A,3330
76
76
  dbos/dbos-config.schema.json,sha256=LyUT1DOTaAwOP6suxQGS5KemVIqXGPyu_q7Hbo0neA8,6192
77
77
  dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
78
78
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
79
- dbos-1.14.0a6.dist-info/RECORD,,
79
+ dbos-1.14.0a8.dist-info/RECORD,,