mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 09:27:56 -04:00
stub out antivirus in dev
antivirus is sometimes tough to get running locally - now in dev antivirus is skipped unless `ANTIVIRUS_ENABLED=1` is set on the command line. on all other environments it is always enabled.
This commit is contained in:
@@ -108,6 +108,9 @@ class Config(object):
|
||||
CRONITOR_ENABLED = False
|
||||
CRONITOR_KEYS = json.loads(os.environ.get('CRONITOR_KEYS', '{}'))
|
||||
|
||||
# Antivirus
|
||||
ANTIVIRUS_ENABLED = True
|
||||
|
||||
###########################
|
||||
# Default config values ###
|
||||
###########################
|
||||
@@ -354,6 +357,8 @@ class Development(Config):
|
||||
STATSD_PORT = 1000
|
||||
STATSD_PREFIX = "stats-prefix"
|
||||
|
||||
ANTIVIRUS_ENABLED = os.getenv('ANTIVIRUS_ENABLED') == '1'
|
||||
|
||||
for queue in QueueNames.all_queues():
|
||||
Config.CELERY_QUEUES.append(
|
||||
Queue(queue, Exchange('default'), routing_key=queue)
|
||||
@@ -381,6 +386,8 @@ class Test(Development):
|
||||
|
||||
BROKER_URL = 'you-forgot-to-mock-celery-in-your-tests://'
|
||||
|
||||
ANTIVIRUS_ENABLED = True
|
||||
|
||||
for queue in QueueNames.all_queues():
|
||||
Config.CELERY_QUEUES.append(
|
||||
Queue(queue, Exchange('default'), routing_key=queue)
|
||||
|
||||
Reference in New Issue
Block a user