Skip to content

Commit

Permalink
update run_view_db_checks to use env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
claire-peters committed Dec 21, 2023
1 parent 5d2192e commit 342fc9d
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
from django.core.management.base import BaseCommand

from coldfront.plugins.fasrc_monitoring.utils import run_view_db_checks
from coldfront.core.utils.common import import_from_settings
from coldfront.config.env import ENV

class Command(BaseCommand):
help = 'automatically check pages and database entries for common issues.'

def add_arguments(self, parser):
parser.add_argument('username', nargs='+', type=str)
parser.add_argument('password', nargs='+', type=str)

def handle(self, *args, **options):
username = options['username'][0]
password = options['password'][0]
username = ENV.str('TESTUSER')
password = ENV.str('TESTPASS')
run_view_db_checks(username, password)

0 comments on commit 342fc9d

Please sign in to comment.