mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
35 lines
688 B
PHP
35 lines
688 B
PHP
<?php
|
|
|
|
namespace App\Jobs;
|
|
|
|
use App\Repositories\ClaimRepository;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
class SettleClaim implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
/**
|
|
* Create a new job instance.
|
|
*/
|
|
public function __construct(public int $userId)
|
|
{
|
|
|
|
}
|
|
|
|
public $timeout = 600;
|
|
|
|
/**
|
|
* Execute the job.
|
|
*/
|
|
public function handle(): void
|
|
{
|
|
$userId = $this->userId;
|
|
$logMsg = "userId: $userId";
|
|
$rep = new ClaimRepository();
|
|
$result = $rep->settleUser($userId, false, false, true);
|
|
do_log("$logMsg, result: " . var_export($result, true));
|
|
}
|
|
}
|