File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ def create_screenshot_file(self, is_thumbnail=False):
160160 if is_thumbnail :
161161 url += '&thumbnail'
162162 path = 'snapshot-thumbnails'
163- response = requests .get (url , timeout = (5 , 30 ))
163+ response = requests .get (url , timeout = (10 , 50 ))
164164 date_suffix = timezone .now ().strftime ("%Y-%m-%d_%H-%M-%SZ" )
165165 screenshot_file = SimpleUploadedFile (
166166 f'{ path } /{ self .pk } _{ date_suffix } .png' ,
@@ -196,7 +196,9 @@ def save_screenshot():
196196 post_save .disconnect (save_screenshot_handler , sender = Snapshot )
197197 instance = kwargs .get ('instance' )
198198 # only create snapshot if data changed
199- if instance .data_changed (['data' , 'screenshot_generated' , 'thumbnail_generated' ]):
199+ if instance .data_changed ([
200+ 'data' , 'screenshot_generated' , 'thumbnail_generated'
201+ ]) or not bool (instance .thumbnail_generated ):
200202 if not 'resources' in instance .data :
201203 return
202204 try :
Original file line number Diff line number Diff line change 11from django .conf import settings
22from django .contrib import admin
33from django .urls import path
4- from graphene_django .views import GraphQLView
54from django .views .decorators .csrf import csrf_exempt
5+ from graphene_django .views import GraphQLView
66
77urlpatterns = [
88 path ('gmanage/' , admin .site .urls ),
You can’t perform that action at this time.
0 commit comments