Skip to content

[Chore] Refactored executing Ookla speedtests and added new events#1264

Merged
alexjustesen merged 5 commits intomainfrom
refactored-executing-ookla-speedtests
Feb 29, 2024
Merged

[Chore] Refactored executing Ookla speedtests and added new events#1264
alexjustesen merged 5 commits intomainfrom
refactored-executing-ookla-speedtests

Conversation

@alexjustesen
Copy link
Owner

@alexjustesen alexjustesen commented Feb 29, 2024

📃 Description

This PR refactored running manual and scheduled Ookla speedtests. This work was needed to bring flexibility to the process for future speedtest services and additional methods for triggering speedtests.

This PR also makes use of new Result model statuses where as result is Started and then Completed or Failed.

🪵 Changelog

➕ Added

  • new events SpeedtestCompleted, SpeedtestFailed and SpeedtestStarted for listeners to hook into.

✏️ Changed

  • refactored the process of running manual and scheduled Ookla speedtests.
  • database notification are now sent to each user.

🗑️ Removed

  • app:run-ookla-speedtest command, no longer needed.
  • ResultCreated event.

🪜 Process

Manual process

flowchart TD
    A[Manual trigger \n i.e. button click] --> B(Run speedtest \n action)
    B --> C(Queue execute \n speedtest job)
    C --> D(Worker process \n speedtest job)
Loading

Scheduled process

flowchart TD
    A[Task Scheduler] --> B{Schedule \n exists?}
    B --> |No| Z(End process)
    B --> |Yes| C(Run scheduled \n speedtests action)
    C --> D{Is Ookla \n speedtest due?}
    D --> |No| Z
    D --> |Yes| E(Run speedtest \n action)
    E --> F(Queue execute \n speedtest job)
    F --> G(Worker process \n speedtest job)
Loading

@alexjustesen alexjustesen added the chore Nothing fancy, just needs to get done label Feb 29, 2024
@alexjustesen alexjustesen self-assigned this Feb 29, 2024
@alexjustesen alexjustesen changed the title [Chore] Refactored executing Ookla speedtests [Chore] Refactored executing Ookla speedtests and added new events Feb 29, 2024
@alexjustesen alexjustesen merged commit fcf9fa2 into main Feb 29, 2024
@alexjustesen alexjustesen deleted the refactored-executing-ookla-speedtests branch February 29, 2024 20:24
@alexjustesen alexjustesen mentioned this pull request Feb 29, 2024
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Nothing fancy, just needs to get done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant