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 4
4
load_dotenv ()
5
5
6
6
from release import processRelease
7
+ from multiprocessing import Process
7
8
8
9
import os
9
10
import hashlib
10
11
import hmac
11
- import asyncio
12
12
13
13
14
14
token = os .environ .get ("API_TOKEN" )
@@ -27,7 +27,8 @@ async def webhooks(repo):
27
27
28
28
if payload ['repository' ]['name' ] == repo and 'action' in payload .keys ():
29
29
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 ()
31
32
32
33
return 'Thanks!' , 202
33
34
Original file line number Diff line number Diff line change 6
6
from pathlib import Path
7
7
8
8
9
- async def processRelease (repo , payload ):
9
+ def processRelease (repo , payload ):
10
10
base_path = Path (__file__ ).parent
11
11
file_name = repo + '.json'
12
12
file_path = (base_path / '..' / 'sites' / file_name ).resolve ()
You can’t perform that action at this time.
0 commit comments