Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Apr 25, 2024
1 parent 2418678 commit 0d68929
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions scripts/cleanup_database/history_table_pruner.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def run(self):
Due to the very large size of some tables, we run operations in batches, using low/high history id as boundaries.
"""
if self.min_id is None:
logging.info(f"No histories exist")
logging.info("No histories exist")
return

low = self.min_id
Expand Down Expand Up @@ -90,7 +90,7 @@ def _run_batch(self, low, high):
self._drop_tmp_table()

def _get_min_max_ids(self):
stmt = text(f"SELECT min(id), max(id) FROM history WHERE user_id IS NULL AND hid_counter = 1 AND create_time < :create_time")
stmt = text("SELECT min(id), max(id) FROM history WHERE user_id IS NULL AND hid_counter = 1 AND create_time < :create_time")
params = {"create_time": self.max_create_time}
with self.engine.begin() as conn:
minmax = conn.execute(stmt, params).all()
Expand All @@ -100,7 +100,7 @@ def _mark_histories_as_deleted_and_purged(self, low, high):
"""Mark target histories as deleted and purged to prevent their further usage."""
logging.info(f"Marking histories {low}-{high} as deleted and purged")
stmt = text(
f"""
"""
UPDATE history
SET deleted = TRUE, purged = TRUE
WHERE user_id IS NULL AND hid_counter = 1 AND create_time < :create_time AND id >= :low AND id < :high
Expand Down
2 changes: 0 additions & 2 deletions scripts/cleanup_database/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from sqlalchemy.orm import Session

from galaxy import model as m
from galaxy.datatypes.registry import Registry as DatatypesRegistry
from galaxy.model.triggers.update_audit_table import install as install_timestamp_triggers

# utility fixtures

Expand Down

0 comments on commit 0d68929

Please sign in to comment.