Compare commits
No commits in common. "a1ddb43ed08ab9313d5cdeaf5b6c7fb3c7ecb23b" and "14bcf93be3c98b9952c37f1a2e46c770920d6930" have entirely different histories.
a1ddb43ed0
...
14bcf93be3
2 changed files with 1 additions and 5 deletions
|
@ -1,12 +1,9 @@
|
|||
from logging.config import fileConfig
|
||||
import os
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from sqlalchemy import create_engine
|
||||
from alembic import context
|
||||
|
||||
load_dotenv()
|
||||
|
||||
# Import models for autogenerate support
|
||||
from app.database import Base
|
||||
from app.models import *
|
||||
|
|
|
@ -3,7 +3,6 @@ from typing import Any, Coroutine, Dict
|
|||
from uuid import UUID
|
||||
|
||||
from websockets import ConnectionClosed
|
||||
from starlette.websockets import WebSocketDisconnect
|
||||
|
||||
from app.ocpp_proto.chargepoint import ChargePoint
|
||||
|
||||
|
@ -13,7 +12,7 @@ async def start(id: UUID, cp: ChargePoint):
|
|||
try:
|
||||
__active_connections[id] = cp
|
||||
await cp.start()
|
||||
except (ConnectionClosed, WebSocketDisconnect):
|
||||
except ConnectionClosed:
|
||||
logging.info("Charging station '%s' (%s) disconnected", cp.id, id)
|
||||
__active_connections.pop(id, None)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue