Skip to content

feat: [#795] Add WithSchedule function#1260

Merged
hwbrzzl merged 2 commits intomasterfrom
bowen/#795
Nov 15, 2025
Merged

feat: [#795] Add WithSchedule function#1260
hwbrzzl merged 2 commits intomasterfrom
bowen/#795

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Nov 15, 2025

📑 Description

Closes goravel/goravel#795

This pull request adds support for registering scheduled events in the application builder, enhancing the framework's scheduling capabilities. The changes introduce a new method to set scheduled events, update the builder's internal state, and ensure scheduled events are registered during application creation. Mock support for the new scheduling feature is also included.

✅ Checks

  • Added test cases for my code

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.96%. Comparing base (6918a00) to head (6be9280).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1260      +/-   ##
==========================================
+ Coverage   67.93%   67.96%   +0.03%     
==========================================
  Files         261      261              
  Lines       15177    15186       +9     
==========================================
+ Hits        10310    10321      +11     
+ Misses       4424     4423       -1     
+ Partials      443      442       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hwbrzzl hwbrzzl marked this pull request as ready for review November 15, 2025 07:55
@hwbrzzl hwbrzzl requested a review from a team as a code owner November 15, 2025 07:55
Copilot AI review requested due to automatic review settings November 15, 2025 07:55
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.50.

Benchmark suite Current: 6be9280 Previous: 6918a00 Ratio
Benchmark_DecryptString 5634 ns/op 2032 B/op 16 allocs/op 2187 ns/op 2032 B/op 16 allocs/op 2.58
Benchmark_DecryptString - ns/op 5634 ns/op 2187 ns/op 2.58

This comment was automatically generated by workflow using github-action-benchmark.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for registering scheduled events in the application builder, enhancing the framework's scheduling capabilities by providing a fluent interface for scheduling configuration during application setup.

  • Introduces WithSchedule method to set scheduled events for the application
  • Adds scheduled event registration logic in the Create() method with proper error handling
  • Includes comprehensive test coverage and mock implementations

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
contracts/foundation/application_builder.go Adds WithSchedule method signature to the ApplicationBuilder interface
foundation/application_builder.go Implements WithSchedule method and adds scheduled event registration logic in Create()
foundation/application_builder_test.go Adds comprehensive test cases for WithSchedule functionality covering success and error scenarios
mocks/foundation/ApplicationBuilder.go Adds mock implementation for WithSchedule method following the established pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hwbrzzl hwbrzzl merged commit 953062f into master Nov 15, 2025
19 of 20 checks passed
@hwbrzzl hwbrzzl deleted the bowen/#795 branch November 15, 2025 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SUB-786] Add WithSchedule function

2 participants