mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Adds rq retry options (#12588)
* adds rq retry options #12327 * Clean up docs; disable retries of failed jobs by default * Pass a Retry object only if RQ_RETRY_MAX is non-zero --------- Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
This commit is contained in:
committed by
GitHub
parent
0df6a5793a
commit
2204735e9f
@@ -9,6 +9,7 @@ from netbox.config import get_config
|
||||
from netbox.constants import RQ_QUEUE_DEFAULT
|
||||
from netbox.registry import registry
|
||||
from utilities.api import get_serializer_for_model
|
||||
from utilities.rqworker import get_rq_retry
|
||||
from utilities.utils import serialize_object
|
||||
from .choices import *
|
||||
from .models import Webhook
|
||||
@@ -116,5 +117,6 @@ def flush_webhooks(queue):
|
||||
snapshots=data['snapshots'],
|
||||
timestamp=str(timezone.now()),
|
||||
username=data['username'],
|
||||
request_id=data['request_id']
|
||||
request_id=data['request_id'],
|
||||
retry=get_rq_retry()
|
||||
)
|
||||
|
Reference in New Issue
Block a user