Skip to content

Commit

Permalink
Fix #1285 get EMAIL_QUEUE_FOLDER from settings not os env
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsimpson committed Feb 7, 2024
1 parent bbfa291 commit 19694c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions subscribie/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
Plan,
EmailTemplate,
)
from subscribie import settings
from pathlib import Path
from jinja2 import Template
import time
import os

log = logging.getLogger(__name__)

Expand All @@ -20,7 +20,7 @@ class EmailMessageQueue(EmailMessage):
def queue(self):
fileName = time.time_ns()
try:
email_queue_folder = os.environ.get("EMAIL_QUEUE_FOLDER")
email_queue_folder = settings.get("EMAIL_QUEUE_FOLDER")
with open(f"{email_queue_folder}/{fileName}", "wb") as f:
f.write(self.as_bytes())
log.debug(f"Written email to queue folder {email_queue_folder}")
Expand Down

0 comments on commit 19694c8

Please sign in to comment.