Skip to content

Commit

Permalink
Fixing exchange handling (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 20, 2023
1 parent 76f65e4 commit 5175706
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Queue/Consumers/WriteChannelPropertyState.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function __construct(
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\InvalidState
* @throws Exceptions\Runtime
Expand Down
7 changes: 7 additions & 0 deletions src/Writers/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use FastyBird\Connector\Tuya\Helpers;
use FastyBird\Connector\Tuya\Queue;
use FastyBird\Library\Exchange\Consumers as ExchangeConsumers;
use FastyBird\Library\Exchange\Exceptions as ExchangeExceptions;
use FastyBird\Library\Metadata\Documents as MetadataDocuments;
use FastyBird\Library\Metadata\Types as MetadataTypes;
use FastyBird\Module\Devices\Exceptions as DevicesExceptions;
Expand Down Expand Up @@ -53,11 +54,17 @@ public function __construct(
{
}

/**
* @throws ExchangeExceptions\InvalidArgument
*/
public function connect(): void
{
$this->consumer->enable(self::class);
}

/**
* @throws ExchangeExceptions\InvalidArgument
*/
public function disconnect(): void
{
$this->consumer->disable(self::class);
Expand Down
2 changes: 2 additions & 0 deletions src/Writers/Periodic.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public function disconnect(): void
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
Expand Down Expand Up @@ -143,6 +144,7 @@ private function handleCommunication(): void
}

/**
* @throws DevicesExceptions\InvalidArgument
* @throws DevicesExceptions\InvalidState
* @throws Exceptions\Runtime
* @throws MetadataExceptions\InvalidArgument
Expand Down

0 comments on commit 5175706

Please sign in to comment.