mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-12 08:12:27 -05:00
try to replace blocking sleep call with nonblocking sleep call
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import json
|
||||
from time import sleep
|
||||
|
||||
import eventlet
|
||||
from celery.signals import task_postrun
|
||||
from flask import current_app
|
||||
from requests import HTTPError, RequestException, request
|
||||
@@ -83,7 +83,7 @@ def process_job(job_id, sender_id=None):
|
||||
process_row(row, template, job, service, sender_id=sender_id)
|
||||
count = count + 1
|
||||
if count % 3 == 0:
|
||||
sleep(1)
|
||||
eventlet.sleep(1)
|
||||
|
||||
# End point/Exit point for message send flow.
|
||||
job_complete(job, start=start)
|
||||
|
||||
Reference in New Issue
Block a user