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

Freegle / Iznik / 11933

10 May 2026 06:13AM UTC coverage: 72.889% (+0.05%) from 72.843%
11933

push

circleci

web-flow
Merge pull request #405 from Freegle/feat/batch-migrate-non-email-jobs

feat(batch): migrate non-email cron scripts to Laravel artisan commands

13854 of 20887 branches covered (66.33%)

Branch coverage included in aggregate %.

789 of 1004 new or added lines in 21 files covered. (78.59%)

36 existing lines in 3 files now uncovered.

102807 of 139167 relevant lines covered (73.87%)

22.45 hits per line

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

0.0
/iznik-batch/app/Console/Commands/User/ProcessExportsCommand.php
1
<?php
2

3
namespace App\Console\Commands\User;
4

5
use App\Console\Concerns\PreventsOverlapping;
6
use App\Services\UserDataExportService;
7
use App\Traits\GracefulShutdown;
8
use Illuminate\Console\Command;
9
use Illuminate\Support\Facades\Log;
10

11
class ProcessExportsCommand extends Command
12
{
13
    use PreventsOverlapping;
14
    use GracefulShutdown;
15

16
    protected $signature = 'users:process-exports
17
                            {--dry-run : Log what would be processed without making changes}';
18

19
    protected $description = 'Process pending GDPR data export requests and purge old completed export data';
20

21
    public function handle(UserDataExportService $service): int
×
22
    {
23
        if (!$this->acquireLock()) {
×
24
            $this->info('Already running, exiting.');
×
25
            return Command::SUCCESS;
×
26
        }
27

28
        try {
NEW
29
            $dryRun = (bool) $this->option('dry-run');
×
30

NEW
31
            if ($dryRun) {
×
NEW
32
                $this->info('DRY RUN — no exports will be assembled or data written.');
×
33
            }
34

NEW
35
            Log::info('Starting GDPR export processing', ['dry_run' => $dryRun]);
×
36

NEW
37
            $count = $service->processAll($dryRun);
×
38

NEW
39
            $prefix = $dryRun ? '[DRY RUN] Would process' : 'Processed';
×
NEW
40
            $this->info("{$prefix} {$count} export(s).");
×
NEW
41
            Log::info('GDPR export processing complete', ['count' => $count, 'dry_run' => $dryRun]);
×
42

43
            return Command::SUCCESS;
×
44
        } finally {
45
            $this->releaseLock();
×
46
        }
47
    }
48
}
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