wallet tron transactions
This commit is contained in:
43
app/Jobs/Wallet/WalletBlockTransactionQueue.php
Normal file
43
app/Jobs/Wallet/WalletBlockTransactionQueue.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs\Wallet;
|
||||
|
||||
use App\Bean\Queue\Wallet\QueueWalletBlockTransactionBean;
|
||||
use App\Exceptions\QueueException;
|
||||
use App\Service\Coin\Tron\UsdtTrx20Service;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class WalletBlockTransactionQueue implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*/
|
||||
public function handle(array $params): void
|
||||
{
|
||||
$oQueueWalletBlockTransactionBean = new QueueWalletBlockTransactionBean($params);
|
||||
$oUsdtTrx20Service = new UsdtTrx20Service();
|
||||
try {
|
||||
$oUsdtTrx20Service->tronBlockTransactionConsumer($oQueueWalletBlockTransactionBean);
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
public static function putToQueue(QueueWalletBlockTransactionBean $bean): \Illuminate\Foundation\Bus\PendingDispatch
|
||||
{
|
||||
return self::dispatch($bean->toArrayNotNull())->onQueue(QueueWalletBlockTransactionBean::QUEUE_NAME);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user