Skip to content

Commit

Permalink
Merge pull request #18 from Comm-com/development
Browse files Browse the repository at this point in the history
upd
  • Loading branch information
wakirin authored Sep 25, 2024
2 parents fc69043 + 26a5f7e commit 1c75b6f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
38 changes: 38 additions & 0 deletions services/ping_prophet/app/Console/Commands/MnpTestSingle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace app\Console\Commands;

use App\Data\MnpRequestData;
use App\Jobs\MnpRequestJob;
use Illuminate\Console\Command;
use Illuminate\Support\Str;

class MnpTestSingle extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mnp:test-single {--number=}';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Test a single MNP lookup';

/**
* Execute the console command.
*/
public function handle()
{
MnpRequestJob::dispatchSync(new MnpRequestData(
number: $this->option('number'),
api_request_id: Str::uuid()->toString(),
total_numbers: 1,
processed_numbers: 0,
));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public function lookup(MnpRequestData $requestData): void
})
->get($url);

Log::debug('XConnectProvider response', [
'response' => $response->json() ?? $response->body(),
]);

if (!$response->ok()) {
$this->storeResult(
requestData: $requestData,
Expand Down

0 comments on commit 1c75b6f

Please sign in to comment.