khanegi setting and prices records

This commit is contained in:
2026-06-13 17:35:40 +03:30
parent c70cda0b6b
commit 91a82c06e4
15 changed files with 509 additions and 73 deletions
+4 -5
View File
@@ -2,19 +2,18 @@
namespace App\Console\Commands;
use App\Services\ProductPriceSyncService;
use App\Services\LivePriceTickService;
use Illuminate\Console\Command;
class SyncProductPrices extends Command
{
protected $signature = 'product:sync-prices';
protected $description = 'Fetch zaarbox price board + sync product DB (scheduler: every 30s)';
protected $description = 'Alias for prices:tick (backward compatible cron)';
public function handle(ProductPriceSyncService $syncService): int
public function handle(LivePriceTickService $tickService): int
{
// کران: GET https://price.zaarbox.ir/api/free (یا zaarbox_api_url) → کش + UPDATE محصولات
$syncService->syncAll(true);
$tickService->tick();
return self::SUCCESS;
}