Skip to content

Commit 211fc0e

Browse files
committed
remove setup from migrate_osfmetrics_6to8
1 parent 9f9a658 commit 211fc0e

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

admin/management/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ def post(self, request):
210210
class MigrateOsfmetrics6to8(ManagementCommandPermissionView):
211211
def post(self, request):
212212
_command_kwargs = {
213-
'no_setup': True,
214213
'no_color': True,
215214
'no_counts': request.POST.get('no_counts'),
216215
'clear_state': request.POST.get('clear_state'),

osf/management/commands/migrate_osfmetrics_6to8.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import logging
55

66
from django.apps import apps
7-
from django.core.management import call_command
87
from django.core.management.base import BaseCommand
98
from django.db import OperationalError as DjangoOperationalError
109
from elasticsearch6.exceptions import ConnectionError as Elastic6ConnectionError
@@ -438,6 +437,7 @@ def _convert_public_usage_report(
438437

439438

440439
def _backfill_old_usage_report(osf_obj, is_component: bool, until_when: str):
440+
# add a "last month" report with cumulative counts up to that point
441441
_last_month = YearMonth.from_date(datetime.datetime.fromisoformat(until_when)).prior()
442442
_c_views, _c_view_sess, _c_downloads, _c_download_sess = _get_cumulative_usage(
443443
osfid=osf_obj._id,
@@ -680,10 +680,6 @@ def _each_preprintdownload_osfid(until_when, after_osfid=None) -> collections.ab
680680

681681
class Command(BaseCommand):
682682
def add_arguments(self, parser):
683-
parser.add_argument(
684-
'--no-setup',
685-
action='store_true',
686-
)
687683
parser.add_argument(
688684
'--no-counts',
689685
action='store_true',
@@ -720,7 +716,6 @@ def _migration_started_at(self):
720716
def handle(
721717
self,
722718
*,
723-
no_setup,
724719
no_counts,
725720
clear_state,
726721
clear_es8_data,
@@ -731,8 +726,6 @@ def handle(
731726
**kwargs,
732727
):
733728
self._quiet_chatty_loggers()
734-
if not no_setup:
735-
call_command('djelme_backend_setup')
736729
if clear_state:
737730
self._clear_state()
738731
if clear_es8_data:

0 commit comments

Comments
 (0)