mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
@@ -47,7 +47,7 @@ class CalculateUserSeedBonus implements ShouldQueue
|
||||
|
||||
public $tries = 1;
|
||||
|
||||
public $timeout = 3600;
|
||||
public $timeout = 120;
|
||||
|
||||
/**
|
||||
* 获取任务时,应该通过的中间件。
|
||||
@@ -72,6 +72,7 @@ class CalculateUserSeedBonus implements ShouldQueue
|
||||
$this->requestId, $this->beginUid, $this->endUid, $this->idStr, $this->idRedisKey
|
||||
);
|
||||
do_log("$logPrefix, job start ...");
|
||||
|
||||
$haremAdditionFactor = Setting::get('bonus.harem_addition');
|
||||
$officialAdditionFactor = Setting::get('bonus.official_addition');
|
||||
$donortimes_bonus = Setting::get('bonus.donortimes');
|
||||
|
||||
@@ -37,7 +37,7 @@ class CleanupRepository extends BaseRepository
|
||||
|
||||
private static int $oneTaskSeconds = 0;
|
||||
|
||||
private static int $scanSize = 1000;
|
||||
private static int $scanSize = 500;
|
||||
|
||||
public static function recordBatch(\Redis $redis, $uid, $torrentId)
|
||||
{
|
||||
|
||||
@@ -191,7 +191,7 @@ return [
|
||||
'maxJobs' => 0,
|
||||
'memory' => 128,
|
||||
'tries' => 1,
|
||||
'timeout' => 600,
|
||||
'timeout' => 120,
|
||||
'nice' => 0,
|
||||
],
|
||||
],
|
||||
|
||||
@@ -66,7 +66,7 @@ return [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => env('REDIS_QUEUE', 'nexus_queue'),
|
||||
'retry_after' => 90,
|
||||
'retry_after' => 150,
|
||||
'block_for' => null,
|
||||
'after_commit' => true,
|
||||
],
|
||||
|
||||
@@ -350,9 +350,17 @@ HTML;
|
||||
|
||||
public function isIyuu(array $bodyArr): bool
|
||||
{
|
||||
return false;
|
||||
//Not support, due to change frequently
|
||||
// return isset($bodyArr['ret']) && $bodyArr['ret'] == 200;
|
||||
$version = (string)($bodyArr['version'] ?? '');
|
||||
switch ($version) {
|
||||
case '2.0.0':
|
||||
return isset($bodyArr['ret'])
|
||||
&& intval($bodyArr['ret']) === 200
|
||||
&& isset($bodyArr['data']['format'])
|
||||
&& is_string($bodyArr['data']['format'])
|
||||
&& $bodyArr['data']['format'] !== '';
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function listRatings(array $ptGenData, string $imdbLink, string $desc = ''): array
|
||||
@@ -574,6 +582,10 @@ HTML;
|
||||
do_log("$log, site: $site can not be updated: " . $exception->getMessage(), 'error');
|
||||
}
|
||||
}
|
||||
if (empty($ptGenInfo)) {
|
||||
do_log("$log, no pt gen info updated");
|
||||
return false;
|
||||
}
|
||||
$siteIdAndRating = $this->listRatings($ptGenInfo, $torrent->url, $extra->descr);
|
||||
foreach ($siteIdAndRating as $key => $value) {
|
||||
if (!isset($ptGenInfo[$key]['data']) || !is_array($ptGenInfo[$key]['data'])) {
|
||||
|
||||
Reference in New Issue
Block a user