Fix not picking up result from falsy result (#107)

* Fix not picking up result from falsy result

* add test and docs

* typo
This commit is contained in:
Stan Triepels
2023-09-01 02:36:15 +02:00
committed by GitHub
parent a08ef61ba5
commit d8cc0cc4f4
4 changed files with 31 additions and 2 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ def result(task_id, wait=0, cached=Conf.CACHED):
start = time()
while True:
r = Task.get_result(task_id)
if r:
if r is not None:
return r
if (time() - start) * 1000 >= wait >= 0:
break