File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -166,8 +166,8 @@ def get_message(self):
166
166
else :
167
167
capture .update (status )
168
168
elif status == crawlers .CaptureStatus .QUEUED :
169
- capture .update (status , delta = 30 )
170
- print (capture .uuid , crawlers .CaptureStatus (status ).name , int (time .time () + 30 ))
169
+ capture .update (status )
170
+ print (capture .uuid , crawlers .CaptureStatus (status ).name , int (time .time ()))
171
171
elif status == crawlers .CaptureStatus .ONGOING :
172
172
capture .update (status )
173
173
print (capture .uuid , crawlers .CaptureStatus (status ).name , int (time .time ()))
Original file line number Diff line number Diff line change @@ -1531,13 +1531,13 @@ def create(self, task_uuid):
1531
1531
r_crawler .zadd ('crawler:captures' , {self .uuid : launch_time })
1532
1532
r_cache .zadd ('crawler:captures' , {self .uuid : launch_time })
1533
1533
1534
- def update (self , status , delta = 0 ):
1534
+ def update (self , status ):
1535
1535
# Error or Reload
1536
- if not status :
1536
+ if status is None :
1537
1537
r_cache .hset (f'crawler:capture:{ self .uuid } ' , 'status' , CaptureStatus .UNKNOWN .value )
1538
1538
r_cache .zadd ('crawler:captures' , {self .uuid : 0 })
1539
1539
else :
1540
- last_check = int (time .time () + delta )
1540
+ last_check = int (time .time ())
1541
1541
r_cache .hset (f'crawler:capture:{ self .uuid } ' , 'status' , status )
1542
1542
r_cache .zadd ('crawler:captures' , {self .uuid : last_check })
1543
1543
You can’t perform that action at this time.
0 commit comments