Revert the changes to drop LogEntry2 table definition
This commit is contained in:
parent
442312402f
commit
58d7dd07b9
8 changed files with 72 additions and 14 deletions
|
@ -8,7 +8,7 @@ from tempfile import SpooledTemporaryFile
|
|||
|
||||
import features
|
||||
from app import app, storage
|
||||
from data.database import UseThenDisconnect, LogEntry
|
||||
from data.database import UseThenDisconnect, LogEntry, LogEntry2
|
||||
from data.model.log import (get_stale_logs, get_stale_logs_start_id,
|
||||
get_stale_logs_cutoff_id, delete_stale_logs)
|
||||
from data.userfiles import DelegateUserfiles
|
||||
|
@ -36,7 +36,10 @@ class LogRotateWorker(Worker):
|
|||
self.add_operation(self._archive_logs, WORKER_FREQUENCY)
|
||||
|
||||
def _archive_logs(self):
|
||||
self._archive_logs_for_model(LogEntry)
|
||||
# TODO(LogMigrate): Remove the branch once we're back on LogEntry only.
|
||||
models = [LogEntry, LogEntry2]
|
||||
for model in models:
|
||||
self._archive_logs_for_model(model)
|
||||
|
||||
def _archive_logs_for_model(self, model):
|
||||
logger.debug('Attempting to rotate log entries')
|
||||
|
|
Reference in a new issue