Skip to content

Commit

Permalink
its working :)
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Dec 16, 2019
1 parent 7d8de1e commit 1dbf036
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
# oauth2 provider
url('^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
path('jsi18n/', JavaScriptCatalog.as_view(), name='javascript-catalog'),

url('^api/v1/bounty/create', dashboard.views.create_bounty, name='create_bounty'),

# inbox
Expand Down
5 changes: 5 additions & 0 deletions app/kudos/tasks.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import time

from app.redis_service import RedisService
from celery import app
from celery.utils.log import get_task_logger
Expand All @@ -22,9 +24,12 @@ def mint_token_request(self, token_req_id, retry=False):
"""
with redis.lock("tasks:token_req_id:%s" % token_req_id, timeout=LOCK_TIMEOUT):
from kudos.management.commands.mint_all_kudos import sync_latest
from dashboard.utils import has_tx_mined
obj = TokenRequest.objects.get(pk=token_req_id)
tx_id = obj.mint()
if tx_id:
while not has_tx_mined(tx_id, obj.network):
time.sleep(1)
sync_latest(0)
sync_latest(1)
sync_latest(2)
Expand Down
2 changes: 1 addition & 1 deletion app/kudos/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def redeem_bulk_coupon(coupon, profile, address, ip_address, save_addr=False):
else:

signed = w3.eth.account.signTransaction(tx, private_key)
retry_later = True
retry_later = False
try:
txid = w3.eth.sendRawTransaction(signed.rawTransaction).hex()
except Exception as e:
Expand Down

0 comments on commit 1dbf036

Please sign in to comment.