Return bool from public api of Producer and Consumer to indicate of success of process and prevent throwing exception from it

This commit is contained in:
2021-09-18 23:31:05 +03:00
parent b130b09a82
commit e1725ea140
3 changed files with 87 additions and 25 deletions

View File

@ -37,7 +37,7 @@ final class Message
}
/**
* @return Promise<void>
* @psalm-return Promise<bool>
*/
public function finish(): Promise
{
@ -49,7 +49,7 @@ final class Message
/**
* @psalm-param positive-int|0 $timeout
*
* @return Promise<void>
* @psalm-return Promise<bool>
*/
public function requeue(int $timeout): Promise
{
@ -59,7 +59,7 @@ final class Message
}
/**
* @return Promise<void>
* @psalm-return Promise<bool>
*/
public function touch(): Promise
{