• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Freegle / Iznik / 3988

15 Apr 2026 08:41AM UTC coverage: 70.846% (-0.09%) from 70.939%
3988

push

circleci

web-flow
Merge pull request #104 from Freegle/feature/batch-jobs-dry-run-and-fixes

feat: batch jobs dry-run, feature flags, List-Unsubscribe, and user cleanup

13102 of 20045 branches covered (65.36%)

Branch coverage included in aggregate %.

520 of 900 new or added lines in 34 files covered. (57.78%)

34 existing lines in 15 files now uncovered.

92779 of 129408 relevant lines covered (71.69%)

17.29 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/iznik-batch/app/Console/Commands/Chat/UpdateMessageCountsCommand.php
1
<?php
2

3
namespace App\Console\Commands\Chat;
4

5
use App\Services\ChatMaintenanceService;
6
use App\Traits\GracefulShutdown;
7
use App\Traits\LogsBatchJob;
8
use Illuminate\Console\Command;
9
use Illuminate\Support\Facades\Log;
10

11
class UpdateMessageCountsCommand extends Command
12
{
13
    use GracefulShutdown, LogsBatchJob;
14

15
    protected $signature = 'chats:update-counts
16
                            {--dry-run : Show what would be updated without actually changing}';
17

18
    protected $description = 'Update chat room message counts and reopen closed User2Mod chats with unseen messages';
19

20
    public function handle(ChatMaintenanceService $service): int
×
21
    {
22
        $this->registerShutdownHandlers();
×
23

NEW
24
        $dryRun = $this->option('dry-run');
×
25

NEW
26
        if ($dryRun) {
×
NEW
27
            $this->info('DRY RUN — no changes will be made.');
×
28
        }
29

NEW
30
        return $this->runWithLogging(function () use ($service, $dryRun) {
×
NEW
31
            Log::info('Starting chat message count update', ['dry_run' => $dryRun]);
×
UNCOV
32
            $this->info('Updating chat message counts...');
×
33

NEW
34
            $stats = $service->updateMessageCounts($dryRun);
×
35

36
            $this->info("Updated {$stats['rooms_updated']} rooms, reopened {$stats['rooms_reopened']} closed chats.");
×
37
            Log::info('Chat message count update complete', $stats);
×
38

39
            return Command::SUCCESS;
×
40
        });
×
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc