Skip to content

Commit

Permalink
fix cleanup jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Nov 7, 2024
1 parent 567d4fd commit 6f3536f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/Jobs/CalculateUserSeedBonus.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ public function handle()
// $sql = "update users set seed_points = ifnull(seed_points, 0) + $seed_points, seed_points_per_hour = {$seedBonusResult['seed_points']}, seedbonus = seedbonus + $all_bonus, seed_points_updated_at = '$updatedAt' where id = $uid limit 1";
// do_log("$bonusLog, query: $sql");
// NexusDB::statement($sql);
$seedPointsUpdates[] = sprintf("case %d then ifnull(seed_points, 0) + %d", $uid, $seed_points);
$seedPointsPerHourUpdates[] = sprintf("case %d then %d", $uid, $seedBonusResult['seed_points']);
$seedBonusUpdates[] = sprintf("case %d then %d", $uid, $all_bonus);
$seedPointsUpdates[] = sprintf("when %d then ifnull(seed_points, 0) + %d", $uid, $seed_points);
$seedPointsPerHourUpdates[] = sprintf("when %d then %d", $uid, $seedBonusResult['seed_points']);
$seedBonusUpdates[] = sprintf("when %d then %d", $uid, $all_bonus);
if ($fd) {
$log = sprintf(
'%s|%s|%s|%s|%s|%s|%s|%s',
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/UpdateTorrentSeedersEtc.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function handle()
->groupBy(['torrent'])
->get();
foreach ($res as $row) {
$torrents[$row->torrent]["comments"] = $row["c"];
$torrents[$row->torrent]["comments"] = $row->c;
}
$seedersUpdates = $leechersUpdates = $commentsUpdates = [];
foreach ($torrentIdArr as $id) {
Expand Down
2 changes: 1 addition & 1 deletion include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6084,7 +6084,7 @@ function calculate_seed_bonus($uid, $torrentIdArr = null): array
do_log(sprintf(
"$logPrefix, torrent: %s, peer ID: %s, weeks: %s, size_raw: %s GB, size: %s GB, increase A: %s, increase official A: %s",
$torrent['id'], $torrent['peerID'], $weeks_alive, $gb_size_raw, $gb_size, $temp, $officialAIncrease
));
), "debug");
}
if ($count > $maxseeding_bonus)
$count = $maxseeding_bonus;
Expand Down
2 changes: 1 addition & 1 deletion resources/views/filament/widgets/stat-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
colspan="3"
@endif
>
<div class="px-4 py-3 filament-tables-text-column"><span class="{{$item['class'] ?? ''}}">{{$item['value']}}</span></div>
<div class="px-4 py-3 filament-tables-text-column {{$item['class'] ?? ''}}"><span class="">{{$item['value']}}</span></div>
</td>
@endforeach
</tr>
Expand Down

0 comments on commit 6f3536f

Please sign in to comment.