Skip to content

Commit

Permalink
move the counter class from nog_bdb to nog_sql
Browse files Browse the repository at this point in the history
  • Loading branch information
jsjiang committed Oct 13, 2023
1 parent 2f6bfe6 commit a21704d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions ezidapp/management/commands/diag-db-stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
import ezidapp.models.async_queue
import ezidapp.models.identifier
import impl.enqueue
import impl.nog_bdb.counter
import impl.nog_bdb.tb
import impl.nog_sql.counter
import impl.nog_sql.util

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -62,7 +61,7 @@ def handle(self, *_, **opt):
class ORMStats:
def __init__(self):
self.exit_stack = contextlib.ExitStack()
self.counter = self.exit_stack.enter_context(impl.nog_bdb.counter.Counter())
self.counter = self.exit_stack.enter_context(impl.nog_sql.counter.Counter())
self.page_size = django.conf.settings.QUERY_PAGE_SIZE

def print_identifier(self, identifier):
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions migrate_db_to_py3/diag-check-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import django.db.models
import django.db.transaction

import impl.nog_bdb.counter
import impl.nog_sql.counter

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -71,7 +71,7 @@ def handle(self, *_, **opt):
class ViaORM:
def __init__(self):
self.exit_stack = contextlib.ExitStack()
self.counter = self.exit_stack.enter_context(impl.nog_bdb.counter.Counter())
self.counter = self.exit_stack.enter_context(impl.nog_sql.counter.Counter())
self.page_size = django.conf.settings.QUERY_PAGE_SIZE

def list_blobs_all(self):
Expand Down
4 changes: 2 additions & 2 deletions tools_dev/tag_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import re
import sys

import impl.nog_bdb.counter
import impl.nog_sql.counter

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -86,7 +86,7 @@ def __init__(self, args):

def __enter__(self):
self.exit_stack = contextlib.ExitStack()
self.counter = self.exit_stack.enter_context(impl.nog_bdb.counter.Counter())
self.counter = self.exit_stack.enter_context(impl.nog_sql.counter.Counter())
self.count = self.counter.count
return self

Expand Down

0 comments on commit a21704d

Please sign in to comment.