File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 44load_dotenv ()
55
66from release import processRelease
7+ from multiprocessing import Process
78
89import os
910import hashlib
1011import hmac
11- import asyncio
1212
1313
1414token = os .environ .get ("API_TOKEN" )
@@ -27,7 +27,8 @@ async def webhooks(repo):
2727
2828 if payload ['repository' ]['name' ] == repo and 'action' in payload .keys ():
2929 if payload ['action' ] == 'released' and 'release' in payload .keys ():
30- asyncio .create_task (processRelease (repo , payload ))
30+ p = Process (target = processRelease , args = (repo ,payload ))
31+ p .start ()
3132
3233 return 'Thanks!' , 202
3334
Original file line number Diff line number Diff line change 66from pathlib import Path
77
88
9- async def processRelease (repo , payload ):
9+ def processRelease (repo , payload ):
1010 base_path = Path (__file__ ).parent
1111 file_name = repo + '.json'
1212 file_path = (base_path / '..' / 'sites' / file_name ).resolve ()
You can’t perform that action at this time.
0 commit comments