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

fix(cache): try to call event.waitUntil #1422

Merged
merged 1 commit into from
Jul 12, 2023
Merged

fix(cache): try to call event.waitUntil #1422

merged 1 commit into from
Jul 12, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Jul 12, 2023

πŸ”— Linked issue

#1420

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Based on #1421, try to call event.waitUntil for the cache update operation if the first parameter in defineCachedFunction is an event and always for defineCachedEventHandler.

Previously we were using a dangling background promise which was not being ended on Cloudflare workers.

(this is an experimental fix without introducing new API)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 mentioned this pull request Jul 12, 2023
4 tasks
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #1422 (12ca201) into main (574d892) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1422   +/-   ##
=======================================
  Coverage   76.82%   76.82%           
=======================================
  Files          71       71           
  Lines        7317     7317           
  Branches      729      729           
=======================================
  Hits         5621     5621           
  Misses       1695     1695           
  Partials        1        1           

@pi0 pi0 merged commit 13263d1 into main Jul 12, 2023
@pi0 pi0 deleted the fix/cache-event branch July 12, 2023 21:38
@pi0 pi0 mentioned this pull request Aug 4, 2023
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.

1 participant