Skip to content

Commit

Permalink
minor diff 5->6 mutez.
Browse files Browse the repository at this point in the history
tzscan errors do not print stack trace.
version 5.1
  • Loading branch information
habanoz committed May 27, 2019
1 parent 7613ffd commit 9d0767f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/calc/phased_payment_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from model.reward_log import TYPE_FOUNDERS_PARENT, TYPE_OWNERS_PARENT, cmp_by_type_balance
from pay.payment_consumer import logger

MINOR_DIFF = 5
MINOR_DIFF = 6
MINOR_RATIO_DIFF = 1e-6


Expand Down Expand Up @@ -95,8 +95,8 @@ def calculate(self, reward_provider_model):
logger.info("Total rewards after processing is {:,} mutez.".format(total_rwrd_amnt))

if error:
logger.debug("Distributed total amount is {:,} mutez".format(total_amount_to_pay))
logger.debug("Difference between total rewards and distributed total amount is {} mutez. "
logger.debug("Total amount to pay is {:,} mutez".format(total_amount_to_pay))
logger.debug("Difference between total rewards and total payment amount is {} mutez. "
"This is due to floating point arithmetic. (max allowed diff is {})"
.format(error, MINOR_DIFF))

Expand Down
6 changes: 3 additions & 3 deletions src/pay/payment_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ def try_to_pay(self, pymnt_cycle):

return True
except ReadTimeout:
logger.warn("Tzscan call failed", exc_info=True)
logger.warning("Tzscan call failed", exc_info=False)
return False
except ConnectTimeout:
logger.warn("Tzscan connection failed", exc_info=True)
logger.warning("Tzscan connection failed", exc_info=False)
return False
except TzScanException:
logger.warn("Tzscan error at reward loop", exc_info=True)
logger.warning("Tzscan error at reward loop", exc_info=False)
return False
except Exception:
logger.error("Error at payment producer loop", exc_info=True)
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=5.0
version=5.1

0 comments on commit 9d0767f

Please sign in to comment.