Skip to content

Commit

Permalink
Fix exit on error (#51)
Browse files Browse the repository at this point in the history
* Fix exit on error

* Fix thread deamon

* Update image versions
  • Loading branch information
tsudmi authored Jan 31, 2022
1 parent e08d46a commit 2d30322
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ volumes:
services:
oracle:
container_name: oracle
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.1.0
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.1.1
restart: always
entrypoint: ["python"]
command: ["oracle/oracle/main.py"]
Expand All @@ -30,7 +30,7 @@ services:

keeper:
container_name: keeper
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.1.0
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.1.1
restart: always
entrypoint: ["python"]
command: ["oracle/keeper/main.py"]
Expand Down
1 change: 1 addition & 0 deletions oracle/keeper/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def main() -> None:
t = threading.Thread(
target=start_health_server,
args=(create_health_server_runner(keeper_routes),),
daemon=True,
)
t.start()
main()
1 change: 0 additions & 1 deletion oracle/keeper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ def wait_for_transaction(tx_hash: HexBytes) -> None:
current_block = web3_client.eth.block_number


@backoff.on_exception(backoff.expo, Exception, max_time=900)
def get_transaction_params() -> TxParams:
account_nonce = web3_client.eth.getTransactionCount(web3_client.eth.default_account)
latest_block = web3_client.eth.get_block("latest")
Expand Down
1 change: 1 addition & 0 deletions oracle/oracle/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ async def main() -> None:
t = threading.Thread(
target=start_health_server,
args=(create_health_server_runner(oracle_routes),),
daemon=True,
)
t.start()
asyncio.run(main())

0 comments on commit 2d30322

Please sign in to comment.