mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 04:03:55 +00:00
Remove more deprecated options
This commit is contained in:
parent
505584dc48
commit
4b2a6a84f4
|
@ -41,7 +41,7 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def schema_to_dict(schema: Union[WSMessageSchema, WSRequestSchema]):
|
def schema_to_dict(schema: Union[WSMessageSchema, WSRequestSchema]):
|
||||||
return schema.dict(exclude_none=True)
|
return schema.model_dump(exclude_none=True)
|
||||||
|
|
||||||
|
|
||||||
class ExternalMessageConsumer:
|
class ExternalMessageConsumer:
|
||||||
|
@ -344,7 +344,7 @@ class ExternalMessageConsumer:
|
||||||
def _consume_whitelist_message(self, producer_name: str, message: WSMessageSchema):
|
def _consume_whitelist_message(self, producer_name: str, message: WSMessageSchema):
|
||||||
try:
|
try:
|
||||||
# Validate the message
|
# Validate the message
|
||||||
whitelist_message = WSWhitelistMessage.model_validate(message)
|
whitelist_message = WSWhitelistMessage.model_validate(message.model_dump())
|
||||||
except ValidationError as e:
|
except ValidationError as e:
|
||||||
logger.error(f"Invalid message from `{producer_name}`: {e}")
|
logger.error(f"Invalid message from `{producer_name}`: {e}")
|
||||||
return
|
return
|
||||||
|
@ -356,7 +356,7 @@ class ExternalMessageConsumer:
|
||||||
|
|
||||||
def _consume_analyzed_df_message(self, producer_name: str, message: WSMessageSchema):
|
def _consume_analyzed_df_message(self, producer_name: str, message: WSMessageSchema):
|
||||||
try:
|
try:
|
||||||
df_message = WSAnalyzedDFMessage.model_validate(message)
|
df_message = WSAnalyzedDFMessage.model_validate(message.model_dump())
|
||||||
except ValidationError as e:
|
except ValidationError as e:
|
||||||
logger.error(f"Invalid message from `{producer_name}`: {e}")
|
logger.error(f"Invalid message from `{producer_name}`: {e}")
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user