fix debug statement in scheduled tasks

This commit is contained in:
Kenneth Kehl
2026-01-27 07:33:54 -08:00
parent 6ff3205f43
commit 0c10e1cdde
63 changed files with 230 additions and 464 deletions
+4 -8
View File
@@ -34,11 +34,9 @@ def upgrade():
# caveats
# only adjusts notifications for services that have never been in research mode. On live, research mode was
# limited to only services that we have set up ourselves so deemed this acceptable.
billable_services_query = text(
"""
billable_services_query = text("""
SELECT id FROM services_history WHERE id NOT IN (SELECT id FROM services_history WHERE research_mode)
"""
)
""")
billable_services = conn.execute(billable_services_query)
# set to 'null' if there are no billable services so we don't get a syntax error in the update statement
service_ids = ",".join(f"{service.id}" for service in billable_services) or "null"
@@ -102,11 +100,9 @@ def downgrade():
# caveats
# only adjusts notifications for services that have never been in research mode. On live, research mode was
# limited to only services that we have set up ourselves
billable_services = conn.execute(
"""
billable_services = conn.execute("""
SELECT id FROM services_history WHERE id not in (select id from services_history where research_mode)
"""
)
""")
# set to 'null' if there are no billable services so we don't get a syntax error in the update statement
service_ids = ",".join(f"{service.id}" for service in billable_services) or "null"