File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 22
33namespace App \Jobs \Influxdb \v2 ;
44
5- use App \Actions \Influxdb \v2 \BuildPointData ;
65use App \Actions \Influxdb \v2 \CreateClient ;
7- use App \Models \Result ;
86use App \Models \User ;
97use Filament \Notifications \Notification ;
108use Illuminate \Contracts \Queue \ShouldQueue ;
119use Illuminate \Foundation \Queue \Queueable ;
1210use Illuminate \Support \Facades \Log ;
1311use InfluxDB2 \ApiException ;
12+ use InfluxDB2 \Point ;
1413
1514class TestConnectionJob implements ShouldQueue
1615{
@@ -28,13 +27,16 @@ public function __construct(
2827 */
2928 public function handle (): void
3029 {
31- $ result = Result::factory ()->make ();
32-
3330 $ client = CreateClient::run ();
3431
3532 $ writeApi = $ client ->createWriteApi ();
3633
37- $ point = BuildPointData::run ($ result );
34+ $ point = Point::measurement ('speedtest ' )
35+ ->addTag ('service ' , 'faker ' )
36+ ->addField ('download ' , (int ) 420 )
37+ ->addField ('upload ' , (int ) 69 )
38+ ->addField ('ping ' , (float ) 4.321 )
39+ ->time (time ());
3840
3941 try {
4042 $ writeApi ->write ($ point );
You can’t perform that action at this time.
0 commit comments