File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
import arq
2
2
from arq import cron , run_worker
3
3
from foxglove import glove
4
- from pydf import AsyncPydf
5
4
6
5
from src .ext import Mandrill , MessageBird
7
6
from src .settings import Settings
@@ -19,7 +18,6 @@ async def startup(ctx):
19
18
sms_click_url = f'{ settings .click_host_name } /l' ,
20
19
mandrill = Mandrill (settings = settings ),
21
20
messagebird = MessageBird (settings = settings ),
22
- pydf = AsyncPydf (),
23
21
)
24
22
await glove .startup (run_migrations = False )
25
23
Original file line number Diff line number Diff line change 12
12
from httpx import ConnectError
13
13
from itertools import chain
14
14
from pathlib import Path
15
+ from pydf import generate_pdf
15
16
from typing import List , Optional
16
17
17
18
from src .ext import ApiError
@@ -206,7 +207,7 @@ async def _generate_base64_pdf(self, pdf_attachments):
206
207
for a in pdf_attachments :
207
208
if a .html :
208
209
try :
209
- pdf_content = await self . ctx [ 'pydf' ]. generate_pdf (a .html , ** kwargs )
210
+ pdf_content = generate_pdf (a .html , ** kwargs )
210
211
except RuntimeError as e :
211
212
main_logger .warning ('error generating pdf, data: %s' , e )
212
213
else :
You can’t perform that action at this time.
0 commit comments