rDrama/files/commands
TLSM 26acca47b9
Use sessionmaker instead of context block
Essentially there were two bugs:
1) The logging lines before explicit `Session.begin` caused the root
   "A transaction is already begun on this Session.", which is
   resolved by moving the logging within the explicit session block,
   as intended.
2) We were reusing a Session across cron runs. The architecture was
   intended to not do so, but we didn't have an actual sessionmaker
   available to cron. We probably ought to get rid of scoped_session
   elsewhere, but baby steps to resolve the immediate issue.

In testing, this works correctly with the fix to `db.begin`, and
tests with deliberately reintroducing the logging bug, the changes
to session creation prevent the every-15sec stack trace spam.
2023-05-01 04:30:21 -04:00
..
__init__.py [#72] Add seed_db command 2022-06-09 01:33:58 -07:00
cron.py Use sessionmaker instead of context block 2023-05-01 04:30:21 -04:00
cron_setup.py Implement mod-viewable janitor-generated badness stats. 2023-04-30 02:08:07 -05:00
seed_db.py remove holes (#492) 2023-04-01 00:13:30 -05:00
volunteer_janitor_recalc.py Move tabulate import into local functions. 2023-04-30 02:14:55 -05:00