Skip to content

Commit 63dbaed

Browse files
committed
Handle one pipeline multiple projects
1 parent 81ec830 commit 63dbaed

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

dj_elastictranscoder/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.2'
1+
__version__ = '1.0.3'

dj_elastictranscoder/views.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import json
22

33
from django.core.mail import mail_admins
4-
from django.http import HttpResponse, HttpResponseBadRequest
4+
from django.http import Http404, HttpResponse, HttpResponseBadRequest
55
from django.views.decorators.csrf import csrf_exempt
66
from django.views.decorators.http import require_http_methods
77

@@ -122,7 +122,10 @@ def aliyun_endpoint(request):
122122
state = message['state']
123123
job_id = message['jobId']
124124

125-
job = EncodeJob.objects.get(pk=job_id)
125+
try:
126+
job = EncodeJob.objects.get(pk=job_id)
127+
except EncodeJob.DoesNotExist:
128+
raise Http404
126129

127130
# https://help.aliyun.com/document_detail/57347.html?spm=5176.doc29208.6.724.4zQQQ4
128131
if state == 'Success': # Complate

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ def get_version():
5353
"Environment :: Web Environment",
5454
"Framework :: Django",
5555
],
56-
keywords='django,aws,elastic,transcoder,qiniu,audio',
56+
keywords='django,aws,elastic,transcoder,qiniu,audio,aliyun',
5757
)

0 commit comments

Comments
 (0)