Skip to content

Commit 4b18cd9

Browse files
committed
Update dependencies; update type checking.
1 parent ffa2fad commit 4b18cd9

File tree

5 files changed

+2266
-1876
lines changed

5 files changed

+2266
-1876
lines changed

clients/ghost.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Ghost admin client."""
22

33
from datetime import datetime as date
4-
from typing import List, Optional, Tuple
4+
from typing import List, Optional, Tuple, Any
55

66
import jwt
77
import requests
@@ -213,7 +213,7 @@ def get_author(self, author_id: int) -> Optional[List[str]]:
213213
except KeyError as e:
214214
LOGGER.error(f"KeyError while fetching Ghost authorID={author_id}: {e}")
215215

216-
def create_member(self, body: dict) -> Tuple[str, int]:
216+
def create_member(self, body: dict) -> Tuple[Any, int]:
217217
"""
218218
Create new Ghost member account used to receive newsletters.
219219

log.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def create_logger() -> logger:
7575
stdout,
7676
colorize=True,
7777
catch=True,
78-
level="TRACE",
78+
level="INFO",
7979
format=log_formatter,
8080
)
8181
if settings.ENVIRONMENT == "production" and path.isdir("/var/log/api"):
@@ -107,6 +107,15 @@ def create_logger() -> logger:
107107
compression="zip",
108108
level="ERROR",
109109
)
110+
logger.add(
111+
"./logs/info.log",
112+
colorize=True,
113+
catch=True,
114+
format=log_formatter,
115+
rotation="20 MB",
116+
compression="zip",
117+
level="INFO",
118+
)
110119
return logger
111120

112121

0 commit comments

Comments
 (0)