[verified] Harden Etsy MCP validation and scheduled token refresh
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 38s
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 38s
This commit is contained in:
@@ -23,10 +23,12 @@ class EtsySync extends Command
|
||||
return self::SUCCESS;
|
||||
}
|
||||
|
||||
$failed = false;
|
||||
try {
|
||||
$receipts = $etsy->receipts($connection, fresh: true);
|
||||
$this->line('etsy receipts: refreshed ('.($receipts['count'] ?? 0).' open)');
|
||||
} catch (Throwable $exception) {
|
||||
$failed = true;
|
||||
$this->warn('etsy receipts: '.$exception->getMessage());
|
||||
}
|
||||
|
||||
@@ -34,9 +36,10 @@ class EtsySync extends Command
|
||||
$listings = $etsy->listings($connection, fresh: true);
|
||||
$this->line('etsy listings: refreshed ('.count($listings['results'] ?? []).' active)');
|
||||
} catch (Throwable $exception) {
|
||||
$failed = true;
|
||||
$this->warn('etsy listings: '.$exception->getMessage());
|
||||
}
|
||||
|
||||
return self::SUCCESS;
|
||||
return $failed ? self::FAILURE : self::SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\EtsyConnection;
|
||||
use App\Services\Bambuddy;
|
||||
use App\Services\DryerClient;
|
||||
use App\Services\Etsy;
|
||||
@@ -22,11 +21,6 @@ class RefreshIntegrationCache extends Command
|
||||
{
|
||||
$cache->forceRefresh = true;
|
||||
|
||||
if (($connection = EtsyConnection::first()) && $etsy->configured()) {
|
||||
$this->refresh('etsy receipts', fn () => $etsy->receipts($connection));
|
||||
$this->refresh('etsy listings', fn () => $etsy->listings($connection));
|
||||
}
|
||||
|
||||
$this->refresh('parcel2go', function () use ($parcel2Go): void {
|
||||
$parcel2Go->verifyCredentials();
|
||||
foreach (['me/orders/detail', 'me/detail', 'me/prepay/balance'] as $path) {
|
||||
|
||||
Reference in New Issue
Block a user