platform notify
This commit is contained in:
@ -35,8 +35,12 @@ class WalletBlockTransactionQueue implements ShouldQueue
|
||||
}
|
||||
}
|
||||
|
||||
public static function putToQueue(QueueWalletBlockTransactionBean $bean): \Illuminate\Foundation\Bus\PendingDispatch
|
||||
public static function putToQueue(QueueWalletBlockTransactionBean $bean, $delaySec = null): \Illuminate\Foundation\Bus\PendingDispatch
|
||||
{
|
||||
return self::dispatch($bean->toArrayNotNull())->onQueue(QueueWalletBlockTransactionBean::QUEUE_NAME);
|
||||
$queue = self::dispatch($bean->toArrayNotNull())->onQueue(QueueWalletBlockTransactionBean::QUEUE_NAME);
|
||||
if(!empty($delaySec)){
|
||||
$queue->delay(now()->addSeconds($delaySec));
|
||||
}
|
||||
return $queue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
namespace App\Jobs\Wallet;
|
||||
|
||||
use App\Bean\Queue\Wallet\QueueNotifyToPlatformBean;
|
||||
use App\Service\Wallet\PlatformNotifyService;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
@ -24,13 +25,18 @@ class WalletNotifyToPlatformQueue implements ShouldQueue
|
||||
/**
|
||||
* Execute the job.
|
||||
*/
|
||||
public function handle(): void
|
||||
public function handle(array $params): void
|
||||
{
|
||||
//
|
||||
$oPlatformNotifyService = new PlatformNotifyService();
|
||||
$oPlatformNotifyService->notifyToPlatform(new QueueNotifyToPlatformBean($params));
|
||||
}
|
||||
|
||||
public static function putToQueue(QueueNotifyToPlatformBean $bean): \Illuminate\Foundation\Bus\PendingDispatch
|
||||
public static function putToQueue(QueueNotifyToPlatformBean $bean, $delaySec = null): \Illuminate\Foundation\Bus\PendingDispatch
|
||||
{
|
||||
return self::dispatch($bean->toArrayNotNull())->onQueue(QueueNotifyToPlatformBean::QUEUE_NAME);
|
||||
$queue = self::dispatch($bean->toArrayNotNull())->onQueue(QueueNotifyToPlatformBean::QUEUE_NAME);
|
||||
if(!empty($delaySec)){
|
||||
$queue->delay(now()->addSeconds($delaySec));
|
||||
}
|
||||
return $queue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,8 +47,12 @@ class WalletPlatformTransactionQueue implements ShouldQueue
|
||||
}
|
||||
}
|
||||
|
||||
public static function putToQueue(QueueWalletPlatformTransactionBean $bean): \Illuminate\Foundation\Bus\PendingDispatch
|
||||
public static function putToQueue(QueueWalletPlatformTransactionBean $bean, $delaySec = null): \Illuminate\Foundation\Bus\PendingDispatch
|
||||
{
|
||||
return self::dispatch($bean->toArrayNotNull())->onQueue(QueueWalletPlatformTransactionBean::QUEUE_NAME);
|
||||
$queue = self::dispatch($bean->toArrayNotNull())->onQueue(QueueWalletPlatformTransactionBean::QUEUE_NAME);
|
||||
if(!empty($delaySec)){
|
||||
$queue->delay(now()->addSeconds($delaySec));
|
||||
}
|
||||
return $queue;
|
||||
}
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ class WalletPlatformWithdrawTransferQueue implements ShouldQueue
|
||||
|
||||
public static function putToQueue(QueueWalletPlatformWithdrawTransferBean $bean, $delaySec = null): \Illuminate\Foundation\Bus\PendingDispatch
|
||||
{
|
||||
$queue = self::dispatch($bean->toArrayNotNull())->onQueue(QueueWalletPlatformWithdrawTransferBean::QUEUE_NAME);
|
||||
$queue = self::dispatch($bean->toArrayNotNull())->onQueue(QueueWalletPlatformWithdrawTransferBean::QUEUE_NAME);
|
||||
if(!empty($delaySec)){
|
||||
$queue->delay(now()->addSeconds($delaySec));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user