Skip to content

Commit

Permalink
gracefully exit on max timeout (#7240)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored Aug 17, 2020
1 parent 05ea5a7 commit 5824398
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/kudos/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from app.services import RedisService
from celery import app
from celery.exceptions import SoftTimeLimitExceeded
from celery.exceptions import SoftTimeLimitExceeded, TimeLimitExceeded
from celery.utils.log import get_task_logger
from dashboard.utils import get_web3, has_tx_mined
from gas.utils import recommend_min_gas_price_to_confirm_in_time
Expand Down Expand Up @@ -94,7 +94,7 @@ def redeem_bulk_kudos(self, kt_id, retry=False):
while not has_tx_mined(obj.txid, obj.network):
time.sleep(1)
pass
except SoftTimeLimitExceeded:
except (SoftTimeLimitExceeded, TimeLimitExceeded):
print('max timeout for bulk kudos redeem exceeded ... giving up!')
except Exception as e:
print(e)
Expand Down

0 comments on commit 5824398

Please sign in to comment.