Revo Docs

Misc

Some useful commands and tips to keep in mind.

Reset modules cache

To reset the modules cache, you can run the following command on an tinker session:

php artisan tinker
Copied!

And replace the tenantName with the tenant name you want to reset the cache for:

Cache::tags(['{tenantName}-modules'])->flush();
Copied!

Cancel duplicated batched jobs

$batches = \DB::table('job_batches')->orderBy('name')->orderBy('created_at', 'desc')->get()->groupBy('name');
foreach ($batches as $name => $groupedBatches) {
    $toCancel = $groupedBatches->skip(1);
    foreach ($toCancel as $batchData) {
        Bus::findBatch($batchData->id)?->cancel();
    }
}
Copied!

Run queued jobs on machine

php artisan queue:work --queue=low --stop-when-empty
Copied!