Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add background events #2941

Merged
merged 44 commits into from
Dec 19, 2024
Merged

Feat: Add background events #2941

merged 44 commits into from
Dec 19, 2024

Conversation

hmalik88
Copy link
Contributor

This PR adds a new feature: background events, per SIP-28. A summary of the changes made:

  1. The CronjobController was updated to now include logic for handling and storing background events.
  2. snap_scheduleBackgroundEvent RPC method was added to schedule an event.
  3. snap_cancelBackgroundEvent RPC method was added to cancel an event.
  4. snap_getBackgroundEvents RPC method was added to get a snap's background events (not outlined in the SIP, but will be added as an addendum soon).

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 98.79518% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.71%. Comparing base (0a4f8db) to head (036e154).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...snaps-controllers/src/cronjob/CronjobController.ts 97.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2941      +/-   ##
==========================================
+ Coverage   94.59%   94.71%   +0.11%     
==========================================
  Files         494      497       +3     
  Lines       10656    10802     +146     
  Branches     1635     1649      +14     
==========================================
+ Hits        10080    10231     +151     
+ Misses        576      571       -5     

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

@hmalik88 hmalik88 marked this pull request as ready for review December 11, 2024 00:12
@hmalik88 hmalik88 requested a review from a team as a code owner December 11, 2024 00:12
package.json Outdated Show resolved Hide resolved
@FrederikBolding
Copy link
Member

LGTM once @Mrtenz approves it as well

Copy link
Member

@Mrtenz Mrtenz left a comment

Choose a reason for hiding this comment

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

Couple more nits.

Mrtenz
Mrtenz previously approved these changes Dec 19, 2024
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/[email protected] None 0 120 kB types

View full report↗︎

@hmalik88 hmalik88 merged commit 8b2bada into main Dec 19, 2024
164 checks passed
@hmalik88 hmalik88 deleted the hm/background-events branch December 19, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants