platform notify

This commit is contained in:
cano
2024-03-27 00:11:26 +08:00
parent 01e93acdd8
commit 4b47fe7250
21 changed files with 462 additions and 18 deletions

View File

@ -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;
}
}