Skip to content

Commit ecb551d

Browse files
authored
Fix data integrations listener (alexjustesen#2437)
Co-authored-by: Alex Justesen <[email protected]>
1 parent 829d7c0 commit ecb551d

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

app/Listeners/DataIntegrationSubscriber.php renamed to app/Listeners/ProcessSpeedtestDataIntegrations.php

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
use App\Events\SpeedtestFailed;
77
use App\Jobs\Influxdb\v2\WriteResult;
88
use App\Settings\DataIntegrationSettings;
9-
use Illuminate\Events\Dispatcher;
109

11-
class DataIntegrationSubscriber
10+
class ProcessSpeedtestDataIntegrations
1211
{
1312
/**
1413
* Create the event listener.
@@ -20,23 +19,10 @@ public function __construct(
2019
/**
2120
* Handle the event.
2221
*/
23-
public function handle(object $event): void
22+
public function handle(SpeedtestCompleted|SpeedtestFailed $event): void
2423
{
2524
if ($this->settings->influxdb_v2_enabled) {
2625
WriteResult::dispatch($event->result);
2726
}
2827
}
29-
30-
/**
31-
* Register the listeners for the subscriber.
32-
*
33-
* @return array<string, string>
34-
*/
35-
public function subscribe(Dispatcher $events): array
36-
{
37-
return [
38-
SpeedtestCompleted::class => 'handleSpeedtestCompleted',
39-
SpeedtestFailed::class => 'handleSpeedtestFailed',
40-
];
41-
}
4228
}

0 commit comments

Comments
 (0)