feat(tahesab): pump pending documents slowly from admin, not schedule
Send leftover orders and charges one-by-one with a gap so Tahesab is not rate-limited, skip already-synced rows, and expose start/stop plus progress on existing status APIs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\TahesabDocSyncService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class PumpTahesabDocSyncCommand extends Command
|
||||
{
|
||||
protected $signature = 'tahesab:pump-doc-sync';
|
||||
|
||||
protected $description = 'Pump pending Tahesab documents in the background (started from admin, not scheduled)';
|
||||
|
||||
public function handle(TahesabDocSyncService $service): int
|
||||
{
|
||||
$count = $service->runLoop();
|
||||
$this->info((string) $count);
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user