MongoCardJob
This commit is contained in:
parent
ddeafedd8a
commit
56607abee1
@ -27,6 +27,7 @@ class Kernel extends ConsoleKernel
|
||||
{
|
||||
$logPath = storage_path('logs/artisan.log');
|
||||
$schedule->command('real:sync-activated')->cron('* */4 * * *')->withoutOverlapping()->appendOutputTo($logPath);
|
||||
$schedule->command('real:sync-cancelled')->cron('* */4 * * *')->withoutOverlapping()->appendOutputTo($logPath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,6 +5,7 @@ namespace App\Domains\Real\Commands\Sync;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Real\Order;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Domains\Card\Jobs\MongoCardJob;
|
||||
use App\Models\Real\OrderCardPartition;
|
||||
use App\Domains\Real\Repositories\OrderRepository;
|
||||
use App\Domains\Real\Repositories\CompanyRepository;
|
||||
@ -53,6 +54,8 @@ class OrderBaseSync extends Command
|
||||
$value['virtual_order_id'] = $orders[$value['sim']] ?? 0;
|
||||
}
|
||||
|
||||
MongoCardJob::dispatch(array_pluck($data, 'sim'));
|
||||
|
||||
DB::table('real_order_cards')->upsert($data, ['sim', 'deleted_at'], []);
|
||||
}
|
||||
app(OrderCardPartitionRepository::class)->forgetCached();
|
||||
|
Loading…
x
Reference in New Issue
Block a user