Skip to content

Commit

Permalink
Updating metadata package
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Jan 8, 2022
1 parent c7bf822 commit 0570980
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"contributte/console": "^0.9",
"fastybird/datetime-factory": "^0.2",
"fastybird/exchange-plugin": "^0.4",
"fastybird/modules-metadata": "^0.15",
"fastybird/modules-metadata": "^0.22",
"fastybird/socket-server-factory": "^0.1",
"nette/bootstrap": "^3.0",
"nette/di": "^3.0",
Expand Down
2 changes: 1 addition & 1 deletion redisdb_exchange_plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
Redis DB exchange plugin
"""

__version__ = "0.2.12"
__version__ = "0.3.0"
4 changes: 2 additions & 2 deletions redisdb_exchange_plugin/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import modules_metadata.exceptions as metadata_exceptions
from exchange_plugin.consumer import IConsumer
from kink import inject
from modules_metadata.loader import load_schema
from modules_metadata.loader import load_schema_by_routing_key
from modules_metadata.routing import RoutingKey
from modules_metadata.types import ModuleOrigin
from modules_metadata.validator import validate
Expand Down Expand Up @@ -186,7 +186,7 @@ def __validate_routing_key(routing_key: Optional[str]) -> Optional[RoutingKey]:
def __validate_data(self, origin: ModuleOrigin, routing_key: RoutingKey, data: Dict) -> Dict:
"""Validate received exchange message against defined schema"""
try:
schema: str = load_schema(origin, routing_key)
schema: str = load_schema_by_routing_key(routing_key)

except metadata_exceptions.FileNotFoundException as ex:
self.__logger.error(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
redis>=3.5
fastybird-exchange-plugin>=0.4
fastybird-modules-metadata>=0.15
fastybird-modules-metadata>=0.22
kink>=0.6
setuptools>=57.4
2 changes: 1 addition & 1 deletion src/Subscribers/AsyncClientSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private function handle(
Utils\ArrayHash $data
): void {
try {
$schema = $this->schemaLoader->load($origin->getValue(), $routingKey->getValue());
$schema = $this->schemaLoader->loadByRoutingKey($routingKey->getValue());

} catch (ModulesMetadataExceptions\InvalidArgumentException $ex) {
return;
Expand Down

0 comments on commit 0570980

Please sign in to comment.