From f54d4d59a0bfe9b0e3cea5a3a29eb1f75f4df136 Mon Sep 17 00:00:00 2001 From: alexgex Date: Fri, 13 Nov 2020 14:35:08 +0200 Subject: [PATCH 1/3] SKALE-3538 Bump skale.py version to 4.1.dev17 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 69cd54e..cccd88d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -skale.py==4.1.dev11 +skale.py==4.1.dev17 schedule==0.6.0 tenacity==6.2.0 apscheduler==3.6.3 From 25cc2fdb09cb43e408a7276e76935004ecc97194 Mon Sep 17 00:00:00 2001 From: alexgex Date: Fri, 13 Nov 2020 14:35:58 +0200 Subject: [PATCH 2/3] SKALE-3538 Bump SKALE manager version to 1.5.2-develop.20 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0d874e..62bc826 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: DB_ROOT_PASSWORD: ${{ secrets.DB_ROOT_PASSWORD }} DB_PORT: ${{ secrets.DB_PORT }} - MANAGER_TAG: "1.5.2-develop.16" + MANAGER_TAG: "1.5.2-develop.20" steps: - uses: actions/checkout@v2 - name: Set up Python 3.7 From e1795c65d9fe3e7a460016a934bc44ac8bbb88f2 Mon Sep 17 00:00:00 2001 From: alexgex Date: Fri, 13 Nov 2020 15:18:45 +0200 Subject: [PATCH 3/3] SKALE-3538 Improve logs --- bounty_agent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bounty_agent.py b/bounty_agent.py index 5cacc8c..2c8377f 100644 --- a/bounty_agent.py +++ b/bounty_agent.py @@ -114,8 +114,8 @@ def job(self) -> None: last_block_number = self.skale.web3.eth.blockNumber block_data = call_retry.call(self.skale.web3.eth.getBlock, last_block_number) block_timestamp = datetime.utcfromtimestamp(block_data['timestamp']) - self.logger.info(f'Current reward time: {reward_date}') - self.logger.info(f'Block timestamp now: {block_timestamp}') + self.logger.info(f'Next reward date: {reward_date}') + self.logger.info(f'Block timestamp: {block_timestamp}') if reward_date > block_timestamp: self.logger.info('Current block timestamp is less than reward time. Will try in 1 min') raise NotTimeForBountyException(Exception) @@ -130,7 +130,7 @@ def job_listener(self, event): else: self.logger.debug('The job finished successfully)') reward_date = self.get_reward_date() - self.logger.debug(f'Reward date after job: {reward_date}') + self.logger.info(f'Next reward date after job: {reward_date}') utc_now = datetime.utcnow() if utc_now > reward_date: self.logger.debug('Changing reward time by current time') @@ -141,7 +141,7 @@ def job_listener(self, event): def run(self) -> None: """Starts agent.""" reward_date = self.get_reward_date() - self.logger.debug(f'Reward date on agent\'s start: {reward_date}') + self.logger.info(f'Next reward date on agent\'s start: {reward_date}') utc_now = datetime.utcnow() if utc_now > reward_date: reward_date = utc_now