Skip to content

Commit 93c0c80

Browse files
committed
Move private helper to end of class
1 parent a273ffb commit 93c0c80

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

sqlmesh/core/state_sync/db/environment.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -165,20 +165,6 @@ def finalize(self, environment: Environment) -> None:
165165
where=environment_filter,
166166
)
167167

168-
def _fetch_environment_summaries(
169-
self, where: t.Optional[str | exp.Expression] = None
170-
) -> t.List[EnvironmentSummary]:
171-
return [
172-
self._environment_summmary_from_row(row)
173-
for row in fetchall(
174-
self.engine_adapter,
175-
self._environments_query(
176-
where=where,
177-
required_fields=list(EnvironmentSummary.all_fields()),
178-
),
179-
)
180-
]
181-
182168
def get_expired_environments(self, current_ts: int) -> t.List[EnvironmentSummary]:
183169
"""Returns the expired environments.
184170
@@ -331,6 +317,20 @@ def _create_expiration_filter_expr(self, current_ts: int) -> exp.Expression:
331317
expression=exp.Literal.number(current_ts),
332318
)
333319

320+
def _fetch_environment_summaries(
321+
self, where: t.Optional[str | exp.Expression] = None
322+
) -> t.List[EnvironmentSummary]:
323+
return [
324+
self._environment_summmary_from_row(row)
325+
for row in fetchall(
326+
self.engine_adapter,
327+
self._environments_query(
328+
where=where,
329+
required_fields=list(EnvironmentSummary.all_fields()),
330+
),
331+
)
332+
]
333+
334334

335335
def _environment_to_df(environment: Environment) -> pd.DataFrame:
336336
import pandas as pd

0 commit comments

Comments
 (0)