-
Notifications
You must be signed in to change notification settings - Fork 42
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
self.retry in the README example #57
Comments
Also there is an import: |
We would appreciate it if the author answered the question on where self.retry comes from |
This looks like it was lifted from a Celery task. Typically, you want to send push notifications in the background, and Celery is a tool for background tasks. You gain access to the @app.task(
bind=True,
max_retries=5,
default_retry_delay=10,
ignore_result=True,
)
def send_push_message(self, token, message, extra=None):
...
if error:
self.retry(...) When the task fails, you can use
|
In the example in the
README
, the code has two occurance of:Where is the
retry
method defined in the example, and why is it usingself.retry
when it is not called from inside a class method?The text was updated successfully, but these errors were encountered: