mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
remove useless code
This commit is contained in:
parent
72d8c343b4
commit
77eb98a344
1 changed files with 1 additions and 8 deletions
|
@ -12,7 +12,6 @@ import sys
|
|||
import coloredlogs
|
||||
import requests
|
||||
from utils import Dirty, DirtyDelta
|
||||
from sentry_sdk import configure_scope
|
||||
|
||||
logging.getLogger().disabled = True
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -39,13 +38,7 @@ def update_block(session: db.Session, block: list, delay: float = 0, change_call
|
|||
try:
|
||||
change = item.update(session=session)
|
||||
except requests.exceptions.HTTPError as e:
|
||||
with configure_scope() as scope:
|
||||
if str(e.response.status_code).startswith("5"):
|
||||
scope.level = "warning"
|
||||
logger.warning(f"Server error {sys.exc_info()} while updating {repr(item)}.")
|
||||
else:
|
||||
scope.level = "error"
|
||||
logger.error(f"Error {sys.exc_info()} while updating {repr(item)}.")
|
||||
logger.error(f"Error {sys.exc_info()} while updating {repr(item)}.")
|
||||
sentry.extra_context({
|
||||
"item": repr(item),
|
||||
"response": {
|
||||
|
|
Loading…
Reference in a new issue