Skip to content

Commit

Permalink
Del try except (#9)
Browse files Browse the repository at this point in the history
* Del redundant try-except

* Add items to gitignore
  • Loading branch information
evgeny-stakewise authored Jan 6, 2025
1 parent 0428702 commit 633e1fd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ dist
*.env
.DS_Store
docker-compose.*.yml
.python-version
.vscode
.history
11 changes: 3 additions & 8 deletions src/force_exit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncio
import logging
import sys

from src.common.logs import setup_gql_log_level
from src.common.sentry import setup_sentry
Expand All @@ -13,10 +12,6 @@ async def main() -> None:
await force_exits()


try:
setup_sentry()
setup_gql_log_level()
asyncio.run(main())
except Exception as e:
logger.exception(e)
sys.exit(1)
setup_sentry()
setup_gql_log_level()
asyncio.run(main())
11 changes: 3 additions & 8 deletions src/update_ltv.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncio
import logging
import sys

from src.common.logs import setup_gql_log_level
from src.common.sentry import setup_sentry
Expand All @@ -13,10 +12,6 @@ async def main() -> None:
await update_vault_max_ltv_user()


try:
setup_sentry()
setup_gql_log_level()
asyncio.run(main())
except Exception as e:
logger.error(e)
sys.exit(1)
setup_sentry()
setup_gql_log_level()
asyncio.run(main())
9 changes: 2 additions & 7 deletions src/update_price.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import logging
import sys

from src.common.sentry import setup_sentry
from src.price.tasks import check_and_sync

logger = logging.getLogger(__name__)


try:
setup_sentry()
check_and_sync()
except Exception as e:
logger.error(e)
sys.exit(1)
setup_sentry()
check_and_sync()

0 comments on commit 633e1fd

Please sign in to comment.