[PR #826] [MERGED] perf: use waitUntil for async address activity updates #788

Closed
opened 2026-02-26 21:32:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826
Author: @dreamhunter2333
Created: 2/1/2026
Status: Merged
Merged: 2/1/2026
Merged by: @dreamhunter2333

Base: mainHead: feature/email


📝 Commits (1)

  • e9e921d perf: use waitUntil for async address activity updates

📊 Changes

10 files changed (+1072 additions, -991 deletions)

View changed files

📝 frontend/package.json (+3 -3)
📝 frontend/pnpm-lock.yaml (+557 -563)
📝 pages/package.json (+1 -1)
📝 vitepress-docs/package.json (+2 -2)
📝 vitepress-docs/pnpm-lock.yaml (+174 -180)
📝 worker/package.json (+7 -7)
📝 worker/pnpm-lock.yaml (+303 -213)
📝 worker/src/common.ts (+12 -10)
📝 worker/src/mails_api/index.ts (+2 -2)
📝 worker/src/user_api/settings.ts (+11 -10)

📄 Description

User description

Summary

Use ctx.waitUntil() to make address activity time updates non-blocking, improving GET request response times.

Changes

  • worker/src/common.ts - Change updateAddressUpdatedAt to sync function using waitUntil for async DB update
  • worker/src/mails_api/index.ts - Remove await from updateAddressUpdatedAt calls
  • worker/src/user_api/settings.ts - Use waitUntil for async DB update
  • Update dependencies (wrangler, hono, axios, etc.)

Performance Improvement

Before: GET request waits for DB UPDATE to complete before responding
After: GET request returns immediately, DB UPDATE runs in background

Affected Endpoints

  • GET /api/mails
  • GET /api/settings
  • GET /user_api/settings

🤖 Generated with Claude Code


PR Type

enhancement, dependencies


Description

  • Improved performance by making database updates non-blocking using waitUntil

  • Updated dependencies across multiple packages for better compatibility and performance

  • Refactored updateAddressUpdatedAt function to be asynchronous

  • Removed unnecessary await calls for non-blocking execution


Diagram Walkthrough

flowchart LR
  A["Refactor updateAddressUpdatedAt function"] --> B["Use waitUntil for non-blocking updates"]
  B --> C["Remove await calls in API handlers"]
  C --> D["Update dependencies across packages"]

File Walkthrough

Relevant files
Enhancement
3 files
settings.ts
Refactored address update to use `waitUntil`                         
+11/-10 
index.ts
Removed `await` for non-blocking address updates                 
+2/-2     
common.ts
Refactored `updateAddressUpdatedAt` to use `waitUntil`     
+12/-10 
Dependencies
5 files
pnpm-lock.yaml
Updated package dependencies for worker                                   
+303/-213
package.json
Updated frontend dependencies                                                       
+3/-3     
package.json
Updated worker dependencies                                                           
+7/-7     
package.json
Updated wrangler dependency in pages package                         
+1/-1     
package.json
Updated dependencies for Vitepress documentation                 
+2/-2     
Additional files
2 files
pnpm-lock.yaml +557/-563
pnpm-lock.yaml +174/-180


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 2/1/2026 **Status:** ✅ Merged **Merged:** 2/1/2026 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/email` --- ### 📝 Commits (1) - [`e9e921d`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/e9e921d202fa1d13693be63135d5bc7035bbb276) perf: use waitUntil for async address activity updates ### 📊 Changes **10 files changed** (+1072 additions, -991 deletions) <details> <summary>View changed files</summary> 📝 `frontend/package.json` (+3 -3) 📝 `frontend/pnpm-lock.yaml` (+557 -563) 📝 `pages/package.json` (+1 -1) 📝 `vitepress-docs/package.json` (+2 -2) 📝 `vitepress-docs/pnpm-lock.yaml` (+174 -180) 📝 `worker/package.json` (+7 -7) 📝 `worker/pnpm-lock.yaml` (+303 -213) 📝 `worker/src/common.ts` (+12 -10) 📝 `worker/src/mails_api/index.ts` (+2 -2) 📝 `worker/src/user_api/settings.ts` (+11 -10) </details> ### 📄 Description ### **User description** ## Summary Use `ctx.waitUntil()` to make address activity time updates non-blocking, improving GET request response times. ## Changes - `worker/src/common.ts` - Change `updateAddressUpdatedAt` to sync function using `waitUntil` for async DB update - `worker/src/mails_api/index.ts` - Remove `await` from `updateAddressUpdatedAt` calls - `worker/src/user_api/settings.ts` - Use `waitUntil` for async DB update - Update dependencies (wrangler, hono, axios, etc.) ## Performance Improvement **Before:** GET request waits for DB UPDATE to complete before responding **After:** GET request returns immediately, DB UPDATE runs in background ## Affected Endpoints - `GET /api/mails` - `GET /api/settings` - `GET /user_api/settings` 🤖 Generated with [Claude Code](https://claude.ai/code) ___ ### **PR Type** enhancement, dependencies ___ ### **Description** - Improved performance by making database updates non-blocking using `waitUntil` - Updated dependencies across multiple packages for better compatibility and performance - Refactored `updateAddressUpdatedAt` function to be asynchronous - Removed unnecessary `await` calls for non-blocking execution ___ ### Diagram Walkthrough ```mermaid flowchart LR A["Refactor updateAddressUpdatedAt function"] --> B["Use waitUntil for non-blocking updates"] B --> C["Remove await calls in API handlers"] C --> D["Update dependencies across packages"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>3 files</summary><table> <tr> <td><strong>settings.ts</strong><dd><code>Refactored address update to use `waitUntil`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-0e41b1cd8b40c15de837bee6cf774f29499e490f0b565b0f5556b549f7344dd3">+11/-10</a>&nbsp; </td> </tr> <tr> <td><strong>index.ts</strong><dd><code>Removed `await` for non-blocking address updates</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-83710df6a60b2b512e134f32ad9890ab9a255040f6019f0d5603f72f4561cea4">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>common.ts</strong><dd><code>Refactored `updateAddressUpdatedAt` to use `waitUntil`</code>&nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-fcc08fd5aa3c190d0d45c7e3dd208e5ee831d360b272fdd5869607cf472c5eb1">+12/-10</a>&nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>5 files</summary><table> <tr> <td><strong>pnpm-lock.yaml</strong><dd><code>Updated package dependencies for worker</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-b40cf923090a5fb5f6cc0d6ce716c560645419d762871abb50383fdb423288c6">+303/-213</a></td> </tr> <tr> <td><strong>package.json</strong><dd><code>Updated frontend dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-da6498268e99511d9ba0df3c13e439d10556a812881c9d03955b2ef7c6c1c655">+3/-3</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Updated worker dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-89dc6f41a53ce13f2da5a00dd34868762e6cd0df46eddc9f5c3c4510b1493870">+7/-7</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Updated wrangler dependency in pages package</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-74314f72f6616d400be4cb0d161867d8148f23c22d4c12c7188aedb129c00c59">+1/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td><strong>package.json</strong><dd><code>Updated dependencies for Vitepress documentation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-3adbfbfaa65ecc60f48c8d009a52c697d4c80d61ee887799df22407fcb73f380">+2/-2</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></details></td></tr><tr><td><strong>Additional files</strong></td><td><details><summary>2 files</summary><table> <tr> <td><strong>pnpm-lock.yaml</strong></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-41b1ff3a74ba81fa74c8dd225d66d81573be3f2990e1d98b9b09798b147d40a8">+557/-563</a></td> </tr> <tr> <td><strong>pnpm-lock.yaml</strong></td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/826/files#diff-655c1410f6eacceaa9003212a9f840a660ace35e32e60d792be3640ec774af6f">+174/-180</a></td> </tr> </table></details></td></tr></tr></tbody></table> </details> ___ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 21:32:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudflare_temp_email#788
No description provided.