dagster-postgres 0.23.2rc2__py3-none-any.whl → 0.23.2rc3__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 dagster-postgres might be problematic. Click here for more details.

@@ -85,14 +85,11 @@ class PostgresEventLogStorage(SqlEventLogStorage, ConfigurableClass):
85
85
  should_autocreate_tables, "should_autocreate_tables"
86
86
  )
87
87
 
88
- self._disposed = False
89
-
90
88
  # Default to not holding any connections open to prevent accumulating connections per DagsterInstance
91
89
  self._engine = create_engine(
92
90
  self.postgres_url, isolation_level="AUTOCOMMIT", poolclass=db_pool.NullPool
93
91
  )
94
-
95
- self._event_watcher = SqlPollingEventWatcher(self)
92
+ self._event_watcher: Optional[SqlPollingEventWatcher] = None
96
93
 
97
94
  self._secondary_index_cache = {}
98
95
 
@@ -344,6 +341,8 @@ class PostgresEventLogStorage(SqlEventLogStorage, ConfigurableClass):
344
341
  ) -> None:
345
342
  if cursor and EventLogCursor.parse(cursor).is_offset_cursor():
346
343
  check.failed("Cannot call `watch` with an offset cursor")
344
+ if self._event_watcher is None:
345
+ self._event_watcher = SqlPollingEventWatcher(self)
347
346
 
348
347
  self._event_watcher.watch_run(run_id, cursor, callback)
349
348
 
@@ -357,16 +356,13 @@ class PostgresEventLogStorage(SqlEventLogStorage, ConfigurableClass):
357
356
  return deserialize_value(cursor_res.scalar(), EventLogEntry) # type: ignore
358
357
 
359
358
  def end_watch(self, run_id: str, handler: EventHandlerFn) -> None:
360
- self._event_watcher.unwatch_run(run_id, handler)
361
-
362
- def __del__(self) -> None:
363
- # Keep the inherent limitations of __del__ in Python in mind!
364
- self.dispose()
359
+ if self._event_watcher:
360
+ self._event_watcher.unwatch_run(run_id, handler)
365
361
 
366
362
  def dispose(self) -> None:
367
- if not self._disposed:
368
- self._disposed = True
363
+ if self._event_watcher:
369
364
  self._event_watcher.close()
365
+ self._event_watcher = None
370
366
 
371
367
  def alembic_version(self) -> AlembicVersion:
372
368
  alembic_config = pg_alembic_config(__file__)
@@ -1 +1 @@
1
- __version__ = "0.23.2rc2"
1
+ __version__ = "0.23.2rc3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dagster-postgres
3
- Version: 0.23.2rc2
3
+ Version: 0.23.2rc3
4
4
  Summary: A Dagster integration for postgres
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-postgres
6
6
  Author: Dagster Labs
@@ -15,6 +15,6 @@ Classifier: License :: OSI Approved :: Apache Software License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Requires-Python: >=3.8,<3.13
17
17
  License-File: LICENSE
18
- Requires-Dist: dagster ==1.7.2rc2
18
+ Requires-Dist: dagster ==1.7.2rc3
19
19
  Requires-Dist: psycopg2-binary
20
20
 
@@ -2,16 +2,16 @@ dagster_postgres/__init__.py,sha256=LEcXwiGeuZgIvfDg0PVcRuKjUmg0t9Uslx5nLZ8Yg08,
2
2
  dagster_postgres/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
3
3
  dagster_postgres/storage.py,sha256=uo264Cr0it0KzduaGD5_54YmjAPng5Vy5AhPsffPPEU,4193
4
4
  dagster_postgres/utils.py,sha256=b_KukmD2puOJdvTFy0OUZtM5sGWyE1Fq6nP9hmUmRCc,5798
5
- dagster_postgres/version.py,sha256=iDAISu2RsCBMfMqG3kkIFomY-YVmgTP_fULv_NkJ-Sg,26
5
+ dagster_postgres/version.py,sha256=B1qssVXTyb_JwbwX1Dk35glvGWgG_oEMGS5J0Y9TKxs,26
6
6
  dagster_postgres/alembic/alembic.ini,sha256=GovyDEhu_6HvkWV6txqjdDBOe4BseSM0YDWGxXM5_cA,986
7
7
  dagster_postgres/event_log/__init__.py,sha256=pQ7nZw5Fp60xVd_JPsZ61n6G5V4d0y8MfUGNkHvgbik,74
8
- dagster_postgres/event_log/event_log.py,sha256=_YfenoDj7Mu8Z17uEWiYt4uIEwhsjX3NReQPi8okg14,15393
8
+ dagster_postgres/event_log/event_log.py,sha256=w8QheUMubekLwynbsMI3FZCsolKplYMrd1aoGWny6BU,15390
9
9
  dagster_postgres/run_storage/__init__.py,sha256=4bI2C2kkZO9glXH8jIUViYBRSeMjdDHiVQVi_k1HkYw,66
10
10
  dagster_postgres/run_storage/run_storage.py,sha256=KqsJ_vOJyDL6dfO3kgah-10ZbbTPJFXLbTSmvDoGaww,9589
11
11
  dagster_postgres/schedule_storage/__init__.py,sha256=GKJlFZYh27fUxJDMQwNJUwibbTnip1ledbcokczutmk,81
12
12
  dagster_postgres/schedule_storage/schedule_storage.py,sha256=6eqgU2mRZgxiM1q9vB0D3pKfDQ8_Od_A6-1yahIhQlg,8448
13
- dagster_postgres-0.23.2rc2.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
14
- dagster_postgres-0.23.2rc2.dist-info/METADATA,sha256=ON4Bb7Sg3BQDap9iZO8WELLhRo7PsBONknyWeg31K3k,768
15
- dagster_postgres-0.23.2rc2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
16
- dagster_postgres-0.23.2rc2.dist-info/top_level.txt,sha256=lScMtAEKDX1yIv2tGa1nzntBa0HEStfWPfCwD8FWlHk,17
17
- dagster_postgres-0.23.2rc2.dist-info/RECORD,,
13
+ dagster_postgres-0.23.2rc3.dist-info/LICENSE,sha256=TMatHW4_G9ldRdodEAp-l2Xa2WvsdeOh60E3v1R2jis,11349
14
+ dagster_postgres-0.23.2rc3.dist-info/METADATA,sha256=eFGI0nxzZ1YgvyG7mxPKS3bEBaCNPj5_2YtLNkSeAWw,768
15
+ dagster_postgres-0.23.2rc3.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
16
+ dagster_postgres-0.23.2rc3.dist-info/top_level.txt,sha256=lScMtAEKDX1yIv2tGa1nzntBa0HEStfWPfCwD8FWlHk,17
17
+ dagster_postgres-0.23.2rc3.dist-info/RECORD,,