django-qstash 0.0.10__tar.gz → 0.0.11__tar.gz

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.

Potentially problematic release.


This version of django-qstash might be problematic. Click here for more details.

Files changed (59) hide show
  1. {django_qstash-0.0.10 → django_qstash-0.0.11}/PKG-INFO +33 -13
  2. {django_qstash-0.0.10 → django_qstash-0.0.11}/README.md +32 -12
  3. {django_qstash-0.0.10 → django_qstash-0.0.11}/pyproject.toml +1 -1
  4. django_qstash-0.0.11/src/django_qstash/__init__.py +8 -0
  5. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/app/__init__.py +2 -1
  6. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/app/decorators.py +22 -3
  7. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/results/tasks.py +2 -2
  8. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash.egg-info/PKG-INFO +33 -13
  9. django_qstash-0.0.10/src/django_qstash/__init__.py +0 -7
  10. {django_qstash-0.0.10 → django_qstash-0.0.11}/setup.cfg +0 -0
  11. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/app/base.py +0 -0
  12. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/callbacks.py +0 -0
  13. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/client.py +0 -0
  14. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/discovery/__init__.py +0 -0
  15. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/discovery/fields.py +0 -0
  16. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/discovery/models.py +0 -0
  17. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/discovery/utils.py +0 -0
  18. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/discovery/validators.py +0 -0
  19. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/exceptions.py +0 -0
  20. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/handlers.py +0 -0
  21. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/management/__init__.py +0 -0
  22. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/management/commands/__init__.py +0 -0
  23. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/management/commands/available_tasks.py +0 -0
  24. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/management/commands/clear_stale_results.py +0 -0
  25. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/management/commands/task_schedules.py +0 -0
  26. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/results/__init__.py +0 -0
  27. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/results/admin.py +0 -0
  28. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/results/apps.py +0 -0
  29. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/results/migrations/0001_initial.py +0 -0
  30. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/results/migrations/__init__.py +0 -0
  31. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/results/models.py +0 -0
  32. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/results/services.py +0 -0
  33. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/__init__.py +0 -0
  34. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/admin.py +0 -0
  35. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/apps.py +0 -0
  36. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/exceptions.py +0 -0
  37. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/formatters.py +0 -0
  38. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/forms.py +0 -0
  39. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/migrations/0001_initial.py +0 -0
  40. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/migrations/0002_taskschedule_updated_at.py +0 -0
  41. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/migrations/__init__.py +0 -0
  42. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/models.py +0 -0
  43. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/services.py +0 -0
  44. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/signals.py +0 -0
  45. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/schedules/validators.py +0 -0
  46. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/settings.py +0 -0
  47. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/utils.py +0 -0
  48. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash/views.py +0 -0
  49. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash.egg-info/SOURCES.txt +0 -0
  50. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash.egg-info/dependency_links.txt +0 -0
  51. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash.egg-info/requires.txt +0 -0
  52. {django_qstash-0.0.10 → django_qstash-0.0.11}/src/django_qstash.egg-info/top_level.txt +0 -0
  53. {django_qstash-0.0.10 → django_qstash-0.0.11}/tests/test_callbacks.py +0 -0
  54. {django_qstash-0.0.10 → django_qstash-0.0.11}/tests/test_exceptions.py +0 -0
  55. {django_qstash-0.0.10 → django_qstash-0.0.11}/tests/test_handlers.py +0 -0
  56. {django_qstash-0.0.10 → django_qstash-0.0.11}/tests/test_results_models.py +0 -0
  57. {django_qstash-0.0.10 → django_qstash-0.0.11}/tests/test_settings.py +0 -0
  58. {django_qstash-0.0.10 → django_qstash-0.0.11}/tests/test_utils.py +0 -0
  59. {django_qstash-0.0.10 → django_qstash-0.0.11}/tests/test_views.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-qstash
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: A drop-in replacement for Celery's shared_task with Upstash QStash.
5
5
  Author-email: Justin Mitchel <justin@codingforentrepreneurs.com>
6
6
  Project-URL: Changelog, https://github.com/jmitchel3/django-qstash
@@ -33,16 +33,32 @@ Requires-Dist: requests>=2.30
33
33
 
34
34
  _django-qstash_ is a drop-in replacement for Celery's `shared_task`.
35
35
 
36
- To do this, we use:
36
+
37
+ ## How it works
38
+
39
+ In `tasks.py` in your apps:
40
+
41
+ ```python
42
+ from django_qstash import shared_task
43
+
44
+
45
+ @shared_task
46
+ def my_task():
47
+ pass
48
+ ```
49
+ > To use Celery too, you can use `@stashed_task` instead of `@shared_task` more below.
50
+
51
+ To do this we need:
37
52
 
38
53
  - [Upstash QStash](https://upstash.com/docs/qstash/overall/getstarted)
39
- - A single public _webhook_ to call `@shared_task` functions automatically
54
+ - A single public _webhook_ to call `@stashed_task` functions automatically
40
55
 
41
56
  This allows us to:
42
57
 
58
+ - Nearly identical usage to Celery's `@shared_task` with far less configuration and overhead
43
59
  - Focus just on Django
44
- - Drop Celery
45
- - Truly scale Django to zero
60
+ - Drop Celery completely, scale it down, or use it as normal. django-qstash can work hand-in-hand with Celery
61
+ - Unlock true serverless and scale-to-zero for Django
46
62
  - Run background tasks through webhooks
47
63
  - Cut costs
48
64
  - Trigger GitHub Actions Workflows or GitLab CI/CD pipelines for handling other kinds of background tasks based on our project's code.
@@ -51,6 +67,7 @@ This allows us to:
51
67
  ## Table of Contents
52
68
 
53
69
  - [django-qstash](#django-qstash)
70
+ - [How it works](#how-it-works)
54
71
  - [Table of Contents](#table-of-contents)
55
72
  - [Installation](#installation)
56
73
  - [Using Pip](#using-pip)
@@ -98,9 +115,9 @@ INSTALLED_APPS = [
98
115
  ##...
99
116
  ]
100
117
  ```
101
- - `django_qstash` Includes the `@shared_task` decorator and webhook view
118
+ - `django_qstash` Includes the `@shared_task` and `@stashed_task` decorators and webhook view
102
119
  - `django_qstash.results` (Optional): Store task results in Django DB
103
- - `django_qstash.schedules` (Optional): Use QStash Schedules to run your `django_qstash` tasks. Out of the box support for _django_qstash_ `@shared_task`. Schedule tasks using _cron_ (e.g. `0 0 * * *`) format which is required based on [QStash Schedules](https://upstash.com/docs/qstash/features/schedules). use [contrab.guru](https://crontab.guru/) for writing the cron format.
120
+ - `django_qstash.schedules` (Optional): Use QStash Schedules to run your `django_qstash` tasks. Out of the box support for _django_qstash_ `@stashed_task`. Schedule tasks using _cron_ (e.g. `0 0 * * *`) format which is required based on [QStash Schedules](https://upstash.com/docs/qstash/features/schedules). use [contrab.guru](https://crontab.guru/) for writing the cron format.
104
121
 
105
122
  ### Configure Webhook URL
106
123
 
@@ -144,7 +161,7 @@ There is a sample project in [sample_project/](sample_project/) that shows how a
144
161
 
145
162
  ## Usage
146
163
 
147
- Django-QStash revolves around the `shared_task` decorator. The goal is to be a drop-in replacement for Celery's `shared_task` decorator.
164
+ Django-QStash revolves around the `stashed_task` decorator. The goal is to be a drop-in replacement for Celery's `stashed_task` decorator.
148
165
 
149
166
  Here's how it works:
150
167
  - Define a Task
@@ -152,10 +169,10 @@ Here's how it works:
152
169
 
153
170
  ### Define a Task
154
171
  ```python
155
- from django_qstash import shared_task
172
+ from django_qstash import stashed_task
156
173
 
157
174
 
158
- @shared_task
175
+ @stashed_task
159
176
  def hello_world(name: str, age: int = None, activity: str = None):
160
177
  if age is None:
161
178
  print(f"Hello {name}! I see you're {activity}.")
@@ -225,10 +242,13 @@ print(json.dumps(data))
225
242
 
226
243
  ```python
227
244
  # from celery import shared_task
228
- from django_qstash import shared_task
245
+ # becomes
246
+ # from django_qstash import shared_task
247
+ # or
248
+ from django_qstash import stashed_task
229
249
 
230
250
 
231
- @shared_task
251
+ @stashed_task
232
252
  def math_add_task(a, b, save_to_file=False, *args, **kwargs):
233
253
  logger.info(f"Adding {a} and {b}")
234
254
  if save_to_file:
@@ -292,7 +312,7 @@ In Django settings, you can configure the following:
292
312
 
293
313
  ## Schedule Tasks (Optional)
294
314
 
295
- The `django_qstash.schedules` app schedules tasks using Upstash [QStash Schedules](https://upstash.com/docs/qstash/features/schedules) and the django-qstash `@shared_task` decorator.
315
+ The `django_qstash.schedules` app schedules tasks using Upstash [QStash Schedules](https://upstash.com/docs/qstash/features/schedules) and the django-qstash `@stashed_task` decorator.
296
316
 
297
317
  ### Installation
298
318
 
@@ -4,16 +4,32 @@
4
4
 
5
5
  _django-qstash_ is a drop-in replacement for Celery's `shared_task`.
6
6
 
7
- To do this, we use:
7
+
8
+ ## How it works
9
+
10
+ In `tasks.py` in your apps:
11
+
12
+ ```python
13
+ from django_qstash import shared_task
14
+
15
+
16
+ @shared_task
17
+ def my_task():
18
+ pass
19
+ ```
20
+ > To use Celery too, you can use `@stashed_task` instead of `@shared_task` more below.
21
+
22
+ To do this we need:
8
23
 
9
24
  - [Upstash QStash](https://upstash.com/docs/qstash/overall/getstarted)
10
- - A single public _webhook_ to call `@shared_task` functions automatically
25
+ - A single public _webhook_ to call `@stashed_task` functions automatically
11
26
 
12
27
  This allows us to:
13
28
 
29
+ - Nearly identical usage to Celery's `@shared_task` with far less configuration and overhead
14
30
  - Focus just on Django
15
- - Drop Celery
16
- - Truly scale Django to zero
31
+ - Drop Celery completely, scale it down, or use it as normal. django-qstash can work hand-in-hand with Celery
32
+ - Unlock true serverless and scale-to-zero for Django
17
33
  - Run background tasks through webhooks
18
34
  - Cut costs
19
35
  - Trigger GitHub Actions Workflows or GitLab CI/CD pipelines for handling other kinds of background tasks based on our project's code.
@@ -22,6 +38,7 @@ This allows us to:
22
38
  ## Table of Contents
23
39
 
24
40
  - [django-qstash](#django-qstash)
41
+ - [How it works](#how-it-works)
25
42
  - [Table of Contents](#table-of-contents)
26
43
  - [Installation](#installation)
27
44
  - [Using Pip](#using-pip)
@@ -69,9 +86,9 @@ INSTALLED_APPS = [
69
86
  ##...
70
87
  ]
71
88
  ```
72
- - `django_qstash` Includes the `@shared_task` decorator and webhook view
89
+ - `django_qstash` Includes the `@shared_task` and `@stashed_task` decorators and webhook view
73
90
  - `django_qstash.results` (Optional): Store task results in Django DB
74
- - `django_qstash.schedules` (Optional): Use QStash Schedules to run your `django_qstash` tasks. Out of the box support for _django_qstash_ `@shared_task`. Schedule tasks using _cron_ (e.g. `0 0 * * *`) format which is required based on [QStash Schedules](https://upstash.com/docs/qstash/features/schedules). use [contrab.guru](https://crontab.guru/) for writing the cron format.
91
+ - `django_qstash.schedules` (Optional): Use QStash Schedules to run your `django_qstash` tasks. Out of the box support for _django_qstash_ `@stashed_task`. Schedule tasks using _cron_ (e.g. `0 0 * * *`) format which is required based on [QStash Schedules](https://upstash.com/docs/qstash/features/schedules). use [contrab.guru](https://crontab.guru/) for writing the cron format.
75
92
 
76
93
  ### Configure Webhook URL
77
94
 
@@ -115,7 +132,7 @@ There is a sample project in [sample_project/](sample_project/) that shows how a
115
132
 
116
133
  ## Usage
117
134
 
118
- Django-QStash revolves around the `shared_task` decorator. The goal is to be a drop-in replacement for Celery's `shared_task` decorator.
135
+ Django-QStash revolves around the `stashed_task` decorator. The goal is to be a drop-in replacement for Celery's `stashed_task` decorator.
119
136
 
120
137
  Here's how it works:
121
138
  - Define a Task
@@ -123,10 +140,10 @@ Here's how it works:
123
140
 
124
141
  ### Define a Task
125
142
  ```python
126
- from django_qstash import shared_task
143
+ from django_qstash import stashed_task
127
144
 
128
145
 
129
- @shared_task
146
+ @stashed_task
130
147
  def hello_world(name: str, age: int = None, activity: str = None):
131
148
  if age is None:
132
149
  print(f"Hello {name}! I see you're {activity}.")
@@ -196,10 +213,13 @@ print(json.dumps(data))
196
213
 
197
214
  ```python
198
215
  # from celery import shared_task
199
- from django_qstash import shared_task
216
+ # becomes
217
+ # from django_qstash import shared_task
218
+ # or
219
+ from django_qstash import stashed_task
200
220
 
201
221
 
202
- @shared_task
222
+ @stashed_task
203
223
  def math_add_task(a, b, save_to_file=False, *args, **kwargs):
204
224
  logger.info(f"Adding {a} and {b}")
205
225
  if save_to_file:
@@ -263,7 +283,7 @@ In Django settings, you can configure the following:
263
283
 
264
284
  ## Schedule Tasks (Optional)
265
285
 
266
- The `django_qstash.schedules` app schedules tasks using Upstash [QStash Schedules](https://upstash.com/docs/qstash/features/schedules) and the django-qstash `@shared_task` decorator.
286
+ The `django_qstash.schedules` app schedules tasks using Upstash [QStash Schedules](https://upstash.com/docs/qstash/features/schedules) and the django-qstash `@stashed_task` decorator.
267
287
 
268
288
  ### Installation
269
289
 
@@ -6,7 +6,7 @@ requires = [
6
6
 
7
7
  [project]
8
8
  name = "django-qstash"
9
- version = "0.0.10"
9
+ version = "0.0.11"
10
10
  description = "A drop-in replacement for Celery's shared_task with Upstash QStash."
11
11
  readme = "README.md"
12
12
  license = { file = "LICENSE" }
@@ -0,0 +1,8 @@
1
+ from __future__ import annotations
2
+
3
+ __version__ = "0.0.11"
4
+
5
+ from django_qstash.app import shared_task
6
+ from django_qstash.app import stashed_task
7
+
8
+ __all__ = ["stashed_task", "shared_task"]
@@ -3,5 +3,6 @@ from __future__ import annotations
3
3
  from .base import AsyncResult
4
4
  from .base import QStashTask
5
5
  from .decorators import shared_task
6
+ from .decorators import stashed_task
6
7
 
7
- __all__ = ["AsyncResult", "QStashTask", "shared_task"]
8
+ __all__ = ["AsyncResult", "QStashTask", "stashed_task", "shared_task"]
@@ -6,24 +6,43 @@ from typing import Callable
6
6
  from django_qstash.app.base import QStashTask
7
7
 
8
8
 
9
- def shared_task(
9
+ def stashed_task(
10
10
  func: Callable | None = None,
11
11
  name: str | None = None,
12
12
  deduplicated: bool = False,
13
13
  **options: dict[str, Any],
14
14
  ) -> QStashTask:
15
15
  """
16
- Decorator that mimics Celery's shared_task
16
+ Decorator that mimics Celery's shared_task that maintains
17
+ Celery compatibility.
17
18
 
18
19
  Can be used as:
20
+
21
+ from django_qstash import shared_task
22
+
19
23
  @shared_task
20
24
  def my_task():
21
25
  pass
22
26
 
23
- @shared_task(name="custom_name", deduplicated=True)
27
+ @stashed_task(name="custom_name", deduplicated=True)
24
28
  def my_task():
25
29
  pass
26
30
  """
27
31
  if func is not None:
28
32
  return QStashTask(func, name=name, deduplicated=deduplicated, **options)
29
33
  return lambda f: QStashTask(f, name=name, deduplicated=deduplicated, **options)
34
+
35
+
36
+ def shared_task(func: Callable | None = None, **options: dict[str, Any]) -> QStashTask:
37
+ """
38
+ Decorator that is a drop-in replacement for Celery's shared_task.
39
+
40
+ Can be used as:
41
+
42
+ from django_qstash import shared_task
43
+
44
+ @shared_task
45
+ def my_task():
46
+ pass
47
+ """
48
+ return stashed_task(func, **options)
@@ -7,14 +7,14 @@ from django.apps import apps
7
7
  from django.conf import settings
8
8
  from django.utils import timezone
9
9
 
10
- from django_qstash import shared_task
10
+ from django_qstash import stashed_task
11
11
 
12
12
  DJANGO_QSTASH_RESULT_TTL = getattr(settings, "DJANGO_QSTASH_RESULT_TTL", 604800)
13
13
 
14
14
  logger = logging.getLogger(__name__)
15
15
 
16
16
 
17
- @shared_task(name="Cleanup Task Results")
17
+ @stashed_task(name="Cleanup Task Results")
18
18
  def clear_stale_results_task(
19
19
  since=None, stdout=None, user_confirm=False, *args, **options
20
20
  ):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-qstash
3
- Version: 0.0.10
3
+ Version: 0.0.11
4
4
  Summary: A drop-in replacement for Celery's shared_task with Upstash QStash.
5
5
  Author-email: Justin Mitchel <justin@codingforentrepreneurs.com>
6
6
  Project-URL: Changelog, https://github.com/jmitchel3/django-qstash
@@ -33,16 +33,32 @@ Requires-Dist: requests>=2.30
33
33
 
34
34
  _django-qstash_ is a drop-in replacement for Celery's `shared_task`.
35
35
 
36
- To do this, we use:
36
+
37
+ ## How it works
38
+
39
+ In `tasks.py` in your apps:
40
+
41
+ ```python
42
+ from django_qstash import shared_task
43
+
44
+
45
+ @shared_task
46
+ def my_task():
47
+ pass
48
+ ```
49
+ > To use Celery too, you can use `@stashed_task` instead of `@shared_task` more below.
50
+
51
+ To do this we need:
37
52
 
38
53
  - [Upstash QStash](https://upstash.com/docs/qstash/overall/getstarted)
39
- - A single public _webhook_ to call `@shared_task` functions automatically
54
+ - A single public _webhook_ to call `@stashed_task` functions automatically
40
55
 
41
56
  This allows us to:
42
57
 
58
+ - Nearly identical usage to Celery's `@shared_task` with far less configuration and overhead
43
59
  - Focus just on Django
44
- - Drop Celery
45
- - Truly scale Django to zero
60
+ - Drop Celery completely, scale it down, or use it as normal. django-qstash can work hand-in-hand with Celery
61
+ - Unlock true serverless and scale-to-zero for Django
46
62
  - Run background tasks through webhooks
47
63
  - Cut costs
48
64
  - Trigger GitHub Actions Workflows or GitLab CI/CD pipelines for handling other kinds of background tasks based on our project's code.
@@ -51,6 +67,7 @@ This allows us to:
51
67
  ## Table of Contents
52
68
 
53
69
  - [django-qstash](#django-qstash)
70
+ - [How it works](#how-it-works)
54
71
  - [Table of Contents](#table-of-contents)
55
72
  - [Installation](#installation)
56
73
  - [Using Pip](#using-pip)
@@ -98,9 +115,9 @@ INSTALLED_APPS = [
98
115
  ##...
99
116
  ]
100
117
  ```
101
- - `django_qstash` Includes the `@shared_task` decorator and webhook view
118
+ - `django_qstash` Includes the `@shared_task` and `@stashed_task` decorators and webhook view
102
119
  - `django_qstash.results` (Optional): Store task results in Django DB
103
- - `django_qstash.schedules` (Optional): Use QStash Schedules to run your `django_qstash` tasks. Out of the box support for _django_qstash_ `@shared_task`. Schedule tasks using _cron_ (e.g. `0 0 * * *`) format which is required based on [QStash Schedules](https://upstash.com/docs/qstash/features/schedules). use [contrab.guru](https://crontab.guru/) for writing the cron format.
120
+ - `django_qstash.schedules` (Optional): Use QStash Schedules to run your `django_qstash` tasks. Out of the box support for _django_qstash_ `@stashed_task`. Schedule tasks using _cron_ (e.g. `0 0 * * *`) format which is required based on [QStash Schedules](https://upstash.com/docs/qstash/features/schedules). use [contrab.guru](https://crontab.guru/) for writing the cron format.
104
121
 
105
122
  ### Configure Webhook URL
106
123
 
@@ -144,7 +161,7 @@ There is a sample project in [sample_project/](sample_project/) that shows how a
144
161
 
145
162
  ## Usage
146
163
 
147
- Django-QStash revolves around the `shared_task` decorator. The goal is to be a drop-in replacement for Celery's `shared_task` decorator.
164
+ Django-QStash revolves around the `stashed_task` decorator. The goal is to be a drop-in replacement for Celery's `stashed_task` decorator.
148
165
 
149
166
  Here's how it works:
150
167
  - Define a Task
@@ -152,10 +169,10 @@ Here's how it works:
152
169
 
153
170
  ### Define a Task
154
171
  ```python
155
- from django_qstash import shared_task
172
+ from django_qstash import stashed_task
156
173
 
157
174
 
158
- @shared_task
175
+ @stashed_task
159
176
  def hello_world(name: str, age: int = None, activity: str = None):
160
177
  if age is None:
161
178
  print(f"Hello {name}! I see you're {activity}.")
@@ -225,10 +242,13 @@ print(json.dumps(data))
225
242
 
226
243
  ```python
227
244
  # from celery import shared_task
228
- from django_qstash import shared_task
245
+ # becomes
246
+ # from django_qstash import shared_task
247
+ # or
248
+ from django_qstash import stashed_task
229
249
 
230
250
 
231
- @shared_task
251
+ @stashed_task
232
252
  def math_add_task(a, b, save_to_file=False, *args, **kwargs):
233
253
  logger.info(f"Adding {a} and {b}")
234
254
  if save_to_file:
@@ -292,7 +312,7 @@ In Django settings, you can configure the following:
292
312
 
293
313
  ## Schedule Tasks (Optional)
294
314
 
295
- The `django_qstash.schedules` app schedules tasks using Upstash [QStash Schedules](https://upstash.com/docs/qstash/features/schedules) and the django-qstash `@shared_task` decorator.
315
+ The `django_qstash.schedules` app schedules tasks using Upstash [QStash Schedules](https://upstash.com/docs/qstash/features/schedules) and the django-qstash `@stashed_task` decorator.
296
316
 
297
317
  ### Installation
298
318
 
@@ -1,7 +0,0 @@
1
- from __future__ import annotations
2
-
3
- __version__ = "0.0.10"
4
-
5
- from django_qstash.app import shared_task
6
-
7
- __all__ = ["shared_task"]
File without changes