mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
improve paid torrent + hit and run
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
|
||||
|
||||
use App\Jobs\CheckQueueFailedJobs;
|
||||
use App\Jobs\SettleClaim;
|
||||
use App\Jobs\UpdateUserDownloadPrivilege;
|
||||
use App\Models\ExamUser;
|
||||
use App\Models\Language;
|
||||
use App\Models\PersonalAccessToken;
|
||||
@@ -61,7 +62,7 @@ class Test extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
// $failedJob = DB::table('failed_jobs')->find(555);
|
||||
// $failedJob = DB::table('failed_jobs')->find(569);
|
||||
//
|
||||
// $payload = json_decode($failedJob->payload, true);
|
||||
// dd($payload);
|
||||
@@ -71,7 +72,11 @@ class Test extends Command
|
||||
//
|
||||
// dd($job);
|
||||
|
||||
CheckQueueFailedJobs::dispatch();
|
||||
// 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);
|
||||
UpdateUserDownloadPrivilege::dispatch(1, "yes", "test_key");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Upgrade;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Nexus\Database\NexusDB;
|
||||
|
||||
class MigrateSnatchedHitAndRunId extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'upgrade:migrate_snatched_hr_id';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
NexusDB::statement("update snatched inner join hit_and_runs on snatched.userid = hit_and_runs.uid and snatched.torrentid = hit_and_runs.torrent_id set snatched.hit_and_run_id = hit_and_runs.id");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Upgrade;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Nexus\Database\NexusDB;
|
||||
|
||||
class UpdateSnatchedBuyLogId extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'upgrade:migrate_snatched_buy_log_id';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
NexusDB::statement("UPDATE snatched INNER JOIN torrent_buy_logs ON snatched.userid = torrent_buy_logs.uid AND snatched.torrentid = torrent_buy_logs.torrent_id SET snatched.buy_log_id = torrent_buy_logs.id");
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ class Kernel extends ConsoleKernel
|
||||
$schedule->command('meilisearch:import')->weeklyOn(1, "03:00");
|
||||
$schedule->command('torrent:load_pieces_hash')->dailyAt("01:00");
|
||||
$schedule->job(new CheckQueueFailedJobs())->everySixHours();
|
||||
$schedule->job(new ThirdPartyJob())->everyMinute();
|
||||
// $schedule->job(new ThirdPartyJob())->everyMinute();
|
||||
$schedule->job(new MaintainPluginState())->everyMinute();
|
||||
$schedule->job(new UpdateIsSeedBoxFromUserRecordsCache())->everySixHours();
|
||||
$schedule->job(new CheckCleanup())->everyFifteenMinutes();
|
||||
|
||||
Reference in New Issue
Block a user