Skip to content

Commit 0cca2b1

Browse files
committed
Test fro delay in task info api repsonse
1 parent ba853db commit 0cca2b1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

qpdnd/api/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
from requests.exceptions import HTTPError
4646
from requests.auth import HTTPBasicAuth
4747
import requests
48+
import time
4849

4950
import logging
5051

@@ -218,6 +219,7 @@ def get(self, request, task_id):
218219

219220
# Try to retrieve the task result, may throw an exception
220221
try:
222+
time.sleep(0.30) # Simulate some delay in retrieving the result
221223
result = HUEY.result(task_id)
222224
ret_status = 200
223225
except TaskException:

0 commit comments

Comments
 (0)