kopia lustrzana https://github.com/bugout-dev/moonstream
Add logger and remove prints.
rodzic
eb2d214859
commit
2f10e470ed
|
@ -133,8 +133,7 @@ async def stream_handler(
|
||||||
raise_on_error=True,
|
raise_on_error=True,
|
||||||
)
|
)
|
||||||
except ReceivingEventsException as e:
|
except ReceivingEventsException as e:
|
||||||
logger.error(e)
|
logger.error(f"Error receiving events from provider err: {e}")
|
||||||
logger.error("Error receiving events from provider")
|
|
||||||
raise MoonstreamHTTPException(status_code=500, internal_error=e)
|
raise MoonstreamHTTPException(status_code=500, internal_error=e)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Unable to get events")
|
logger.error("Unable to get events")
|
||||||
|
@ -177,8 +176,7 @@ async def latest_events_handler(
|
||||||
sort_events=True,
|
sort_events=True,
|
||||||
)
|
)
|
||||||
except ReceivingEventsException as e:
|
except ReceivingEventsException as e:
|
||||||
logger.error(e)
|
logger.error(f"Error receiving events from provider err: {e}")
|
||||||
logger.error("Error receiving events from provider")
|
|
||||||
raise MoonstreamHTTPException(status_code=500, internal_error=e)
|
raise MoonstreamHTTPException(status_code=500, internal_error=e)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Unable to get latest events")
|
logger.error("Unable to get latest events")
|
||||||
|
@ -206,7 +204,6 @@ async def next_event_handler(
|
||||||
|
|
||||||
All times must be given as seconds since the Unix epoch.
|
All times must be given as seconds since the Unix epoch.
|
||||||
"""
|
"""
|
||||||
print("next")
|
|
||||||
stream_boundary = data.StreamBoundary(
|
stream_boundary = data.StreamBoundary(
|
||||||
start_time=start_time,
|
start_time=start_time,
|
||||||
end_time=end_time,
|
end_time=end_time,
|
||||||
|
@ -234,8 +231,7 @@ async def next_event_handler(
|
||||||
raise_on_error=True,
|
raise_on_error=True,
|
||||||
)
|
)
|
||||||
except ReceivingEventsException as e:
|
except ReceivingEventsException as e:
|
||||||
print(e)
|
logger.error(f"Error receiving events from provider err: {e}")
|
||||||
logger.error("Error receiving events from provider")
|
|
||||||
raise MoonstreamHTTPException(status_code=500, internal_error=e)
|
raise MoonstreamHTTPException(status_code=500, internal_error=e)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
|
@ -264,7 +260,6 @@ async def previous_event_handler(
|
||||||
|
|
||||||
All times must be given as seconds since the Unix epoch.
|
All times must be given as seconds since the Unix epoch.
|
||||||
"""
|
"""
|
||||||
print("previous")
|
|
||||||
stream_boundary = data.StreamBoundary(
|
stream_boundary = data.StreamBoundary(
|
||||||
start_time=start_time,
|
start_time=start_time,
|
||||||
end_time=end_time,
|
end_time=end_time,
|
||||||
|
@ -292,8 +287,7 @@ async def previous_event_handler(
|
||||||
raise_on_error=True,
|
raise_on_error=True,
|
||||||
)
|
)
|
||||||
except ReceivingEventsException as e:
|
except ReceivingEventsException as e:
|
||||||
print(e)
|
logger.error(f"Error receiving events from provider err: {e}")
|
||||||
logger.error("Error receiving events from provider")
|
|
||||||
raise MoonstreamHTTPException(status_code=500, internal_error=e)
|
raise MoonstreamHTTPException(status_code=500, internal_error=e)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(e)
|
logger.error(e)
|
||||||
|
|
Ładowanie…
Reference in New Issue