seed bonus add log etc

This commit is contained in:
xiaomlove
2025-09-08 03:05:55 +07:00
parent ae08039323
commit 60b5aba518
53 changed files with 720 additions and 131 deletions
@@ -42,10 +42,10 @@ class HitAndRunUpdateStatus extends Command
$torrentId = $this->option('torrent_id');
$ignoreTime = $this->option('ignore_time');
$rep = new HitAndRunRepository();
$result = $rep->cronjobUpdateStatus($uid, $torrentId, $ignoreTime);
$rep->cronjobUpdateStatus($uid, $torrentId, $ignoreTime);
$log = sprintf(
'[%s], %s, uid: %s, torrentId: %s, ignoreTime: %s, result: %s',
nexus()->getRequestId(), __METHOD__, $uid, $torrentId, $ignoreTime, var_export($result, true)
'[%s], %s, uid: %s, torrentId: %s, ignoreTime: %s',
nexus()->getRequestId(), __METHOD__, $uid, $torrentId, $ignoreTime
);
$this->info($log);
do_log($log);
+6 -16
View File
@@ -14,6 +14,7 @@ use App\Models\TorrentExtra;
use App\Models\User;
use App\Repositories\ClaimRepository;
use App\Repositories\ExamRepository;
use App\Repositories\RequireSeedTorrentRepository;
use App\Repositories\SeedBoxRepository;
use App\Repositories\TokenRepository;
use App\Repositories\UploadRepository;
@@ -30,6 +31,8 @@ use NexusPlugin\StickyPromotion\Models\StickyPromotion;
use NexusPlugin\StickyPromotion\Models\StickyPromotionParticipator;
use NexusPlugin\Work\Models\RoleWork;
use NexusPlugin\Work\WorkRepository;
use Rhilip\Bencode\Bencode;
use Rhilip\Bencode\TorrentFile;
use Stichoza\GoogleTranslate\GoogleTranslate;
class Test extends Command
@@ -65,22 +68,9 @@ class Test extends Command
*/
public function handle()
{
// $failedJob = DB::table('failed_jobs')->find(569);
//
// $payload = json_decode($failedJob->payload, true);
// dd($payload);
//
// $base64 = $payload['data']['command'];
// $job = unserialize($base64);
//
// dd($job);
// UpdateUserDownloadPrivilege::dispatch(1, "yes", "test_key");
// $res = unserialize("O:36:\"App\\Jobs\\UpdateUserDownloadPrivilege\":3:{s:6:\"userId\";i:1;s:6:\"status\";s:3:\"yes\";s:9:\"reasonKey\";s:8:\"test_key\";}");
// $res = unserialize("O:36:\"App\\Jobs\\UpdateUserDownloadPrivilege\":3:{s:6:\"userId\";i:1;s:6:\"status\";s:3:\"yes\";s:9:\"reasonKey\";s:8:\"test_key\";}");
// dd($res);
$r = TokenRepository::listUserTokenPermissionAllowed();
dd($r);
$rep = new RequireSeedTorrentRepository();
// $rep->doRemove(Torrent::query()->whereIn('id', [58])->get());
$rep->autoAddToListCronjob();
}
}