'Threadpool attribute result not available
I am trying to process time consuming task in background thread but it seems like threadpool executor is not working properly here
if stickers and stickers[0].filename != '':
if len(stickers) == 1:
image_url = generate_push_s3_image(stickers[0],'daily_rewards')
session3.add(DailyBonusRewards(image_url = image_url))
else:
# for bulk push
executor = ThreadPoolExecutor(max_workers=2)
executor.submit(helper_s3,args=(session3,stickers,))
if executor.result():
# do something
error
Error: 'threadpoolexecutor' object has no attribute 'result'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
