Skip to content

Commit

Permalink
Ejv email fix (#970)
Browse files Browse the repository at this point in the history
* Add in DISABLE_EJV_ERROR_EMAIL.

* Default true for now.

* Testing library fix.
  • Loading branch information
seeker25 authored Jul 20, 2022
1 parent 0956230 commit d2fb623
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ isort

# docker
lovely-pytest-docker
pytest-asyncio
pytest-asyncio==0.18.3

Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ async def _update_feedback(msg: Dict[str, any]): # pylint:disable=too-many-loca
has_errors = await _process_ejv_feedback(group_batches['EJV'])
has_errors = await _process_ap_feedback(group_batches['AP']) or has_errors

if has_errors:
if has_errors and not APP_CONFIG.DISABLE_EJV_ERROR_EMAIL:
await _publish_mailer_events(file_name, minio_location)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ class _Config(): # pylint: disable=too-few-public-methods
# Secret key for encrypting bank account
ACCOUNT_SECRET_KEY = os.getenv('ACCOUNT_SECRET_KEY')

# Disable EJV Error Email
DISABLE_EJV_ERROR_EMAIL = os.getenv('DISABLE_EJV_ERROR_EMAIL', 'true').lower() == 'true'


class DevConfig(_Config): # pylint: disable=too-few-public-methods
"""Creates the Development Config object."""
Expand Down

0 comments on commit d2fb623

Please sign in to comment.