-
-
Notifications
You must be signed in to change notification settings - Fork 62
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: support dispatching the runtime events #351
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nyannyacha
force-pushed
the
feat-emit-worker-event
branch
from
June 3, 2024 05:37
cddcac1
to
f9aab1d
Compare
nyannyacha
force-pushed
the
feat-emit-worker-event
branch
3 times, most recently
from
November 22, 2024 23:44
ce0d7f9
to
5ef1122
Compare
nyannyacha
force-pushed
the
feat-emit-worker-event
branch
from
November 23, 2024 01:17
5ef1122
to
399fd97
Compare
laktek
approved these changes
Nov 23, 2024
🎉 This PR is included in version 1.63.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
kallebysantos
pushed a commit
to kallebysantos/edge-runtime
that referenced
this pull request
Nov 23, 2024
* chore: add dependency * chore: update `Cargo.lock` * stamp: add a utility function * stamp: update flags * stamp: add dependency * chore: update `Cargo.lock` * fix: update `bootstrap.js` to expose the event dispatch functions * stamp: polishing * feat: support dispatching the runtime events * stamp: must be used `CallbackScope` instead of `HandleScope` while dispatching event * stamp: oops * stamp: use `beforeunload` instead of `willterminate` * stamp: resolve merge conflicts * stamp: polishing * chore: add integration tests * stamp: make clippy happy
kallebysantos
pushed a commit
to kallebysantos/edge-runtime
that referenced
this pull request
Nov 23, 2024
* chore: add dependency * chore: update `Cargo.lock` * stamp: add a utility function * stamp: update flags * stamp: add dependency * chore: update `Cargo.lock` * fix: update `bootstrap.js` to expose the event dispatch functions * stamp: polishing * feat: support dispatching the runtime events * stamp: must be used `CallbackScope` instead of `HandleScope` while dispatching event * stamp: oops * stamp: use `beforeunload` instead of `willterminate` * stamp: resolve merge conflicts * stamp: polishing * chore: add integration tests * stamp: make clippy happy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Feature, Enhancement
Description
This PR adds support for event dispatching for the user worker lifecycle.
Type of events supported
detail.reason
property as to which resource limiter triggered this event.The threshold for the beforeunload event can be set through the CLI, and the list of flags is as follows:
The unload event
This event is not triggered at the moment because the trigger point is ambiguous.
Currently, when the resource reaches the limit, the worker is forcibly terminated by the supervisor, so there is no margin to trigger the unload event. To trigger this event, it is necessary to first clarify the point at which it will be triggered.
Sample (beforeunload)
Output