You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
18
18
## Overview
19
19
20
-
FluxQueue is a task queue for Python that gets out of your way. The Rust core makes the process fast with less overhead, least dependencies, and most importantly, less memory usage. Tasks are managed through Redis.
20
+
FluxQueue is a task queue for Python that gets out of your way. Built on a multi-threaded Tokio runtime, FluxQueue delivers high throughput while maintaining low memory usage. The Rust core ensures minimal overhead and dependencies, making it an efficient solution for background task processing. Tasks are managed through Redis.
21
21
22
22
## Key Features
23
23
@@ -90,16 +90,15 @@ from fluxqueue import FluxQueue, Context
90
90
fluxqueue = FluxQueue()
91
91
92
92
@fluxqueue.task_with_context()
93
-
defprocess_data(ctx: Context, data: str):
93
+
defprocess_data_task(ctx: Context, data: str):
94
94
# Access task metadata
95
95
print(f"Task ID: {ctx.metadata.task_id}")
96
96
print(f"Retry count: {ctx.metadata.retries}")
97
97
98
-
# Process the data
99
-
process(data)
98
+
process_data(data)
100
99
```
101
100
102
-
You can also subclass `Context` to create custom contexts with domain-specific resources:
101
+
You can also subclass `Context` to create custom contexts with domain-specific resources. This example shows how to create a `DbContext` that manages database connections efficiently by reusing them across tasks in the same worker thread:
0 commit comments