Error when trying to get the result of a background task
I am trying to use background tasks to deal with rate limiting from an external API. I have this function
which enqueues this action
2 Replies
It mostly works, but occasionally I get errors like
however, I can see in the queue that the task was successful on the first attempt
Hi, seems the issue can be fixed by simply calling
await task.result()
again
I haven't ever had it throw the error on the second time
but this leads me to believe its a gadget bug, and not a problem with my code
unless you can offer any other insight?
ie. by doing
but this seems obviously a pretty hacky fixHello,
I think that the issue might be referring to logger.error. I don't know why that would be an issue though. It should always be available in action context