File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,13 @@ class RunSpeedtest extends Command
2929 */
3030 public function handle ()
3131 {
32- ExecSpeedtest::dispatch ();
32+ $ speedtest = [];
33+
34+ if ($ this ->argument ('server ' )) {
35+ $ speedtest = array_merge ($ speedtest , ['ookla_server_id ' => $ this ->argument ('server ' )]);
36+ }
37+
38+ ExecSpeedtest::dispatch (speedtest: $ speedtest );
3339
3440 $ this ->info ('✅ added manual speedtest to the queue ' );
3541
Original file line number Diff line number Diff line change @@ -33,7 +33,19 @@ public function __construct(
3333 */
3434 public function handle ()
3535 {
36- $ process = new Process (['speedtest ' , '--accept-license ' , '--format=json ' ]);
36+ $ args = [
37+ 'speedtest ' ,
38+ '--accept-license ' ,
39+ '--format=json ' ,
40+ ];
41+
42+ if (! blank ($ this ->speedtest )) {
43+ if (! blank ($ this ->speedtest ['ookla_server_id ' ])) {
44+ $ args = array_merge ($ args , ['--server-id= ' .$ this ->speedtest ['ookla_server_id ' ]]);
45+ }
46+ }
47+
48+ $ process = new Process ($ args );
3749 $ process ->run ();
3850
3951 if (! $ process ->isSuccessful ()) {
You can’t perform that action at this time.
0 commit comments