@pgflow/edge-worker 0.0.10 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +17 -5
- package/dist/CHANGELOG.md +0 -44
- package/dist/LICENSE.md +0 -660
- package/dist/README.md +0 -46
- package/dist/index.js +0 -953
- package/dist/index.js.map +0 -7
package/dist/README.md
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<h1>Edge Worker</h1>
|
|
3
|
-
<a href="https://pgflow.dev">
|
|
4
|
-
<h3>📚 Documentation @ pgflow.dev</h3>
|
|
5
|
-
</a>
|
|
6
|
-
|
|
7
|
-
<h4>⚠️ <strong>ADVANCED PROOF of CONCEPT - NOT PRODUCTION READY</strong> ⚠️</h4>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
A task queue worker for Supabase Edge Functions that extends background tasks with useful features.
|
|
11
|
-
|
|
12
|
-
> [!NOTE]
|
|
13
|
-
> This project is licensed under [AGPL v3](./LICENSE.md) license and is part of **pgflow** stack.
|
|
14
|
-
> See [LICENSING_OVERVIEW.md](../../LICENSING_OVERVIEW.md) in root of this monorepo for more details.
|
|
15
|
-
|
|
16
|
-
## What is Edge Worker?
|
|
17
|
-
|
|
18
|
-
Edge Worker processes messages from a queue and executes user-defined functions with their payloads. It builds upon [Supabase Background Tasks](https://supabase.com/docs/guides/functions/background-tasks) to add reliability features like retries, concurrency control and monitoring.
|
|
19
|
-
|
|
20
|
-
## Key Features
|
|
21
|
-
|
|
22
|
-
- ⚡ **Reliable Processing**: Retries with configurable delays
|
|
23
|
-
- 🔄 **Concurrency Control**: Limit parallel task execution
|
|
24
|
-
- 📊 **Observability**: Built-in heartbeats and logging
|
|
25
|
-
- 📈 **Horizontal Scaling**: Deploy multiple edge functions for the same queue
|
|
26
|
-
- 🛡️ **Edge-Native**: Designed for Edge Functions' CPU/clock limits
|
|
27
|
-
|
|
28
|
-
## How It Works
|
|
29
|
-
|
|
30
|
-
[](https://mermaid.live/edit#pako:eNplkcFugzAMhl8lyrl9AQ47VLBxqdSqlZAGHEziASokyEkmTaXvvoR0o1VziGL_n_9Y9pULLZEnvFItwdSxc1op5o9xTUxU_OQmaMAgy2SL7N0pYXutTMUjGU5WlItYaLog1VFAJSv14paCXdweyw8f-2MZLnZ06LBelXxXRk_DztAM-Gp9KA-kpRP-W7bdvs3Ga4aNaAy0OC_WdzD4B4IQVsLMvvkIZMUiA4mu_8ZHYjW5MxNp4dUnKC9zUHJA-h9R_VQTG-sQyDYINlTs-IaPSCP00q_gGvCK2w5HP53EPyXQJczp5jlwVp9-lOCJJYcbTtq13V_gJgkW0x78lEeefMFgfHYC9an1GqPsraZ9XPiy99svlAqmtA)
|
|
31
|
-
|
|
32
|
-
## Edge Function Optimization
|
|
33
|
-
|
|
34
|
-
Edge Worker is specifically designed to handle Edge Function limitations:
|
|
35
|
-
|
|
36
|
-
- Stops polling near CPU/clock limits
|
|
37
|
-
- Gracefully aborts pending tasks
|
|
38
|
-
- Uses PGMQ's visibility timeout to prevent message loss
|
|
39
|
-
- Auto-spawns new instances for continuous operation
|
|
40
|
-
- Monitors worker health with database heartbeats
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## Documentation
|
|
44
|
-
|
|
45
|
-
For detailed documentation and getting started guide, visit [pgflow.dev](https://pgflow.dev).
|
|
46
|
-
|