Skip to content

Commit

Permalink
Set healthcheck time at start of each process
Browse files Browse the repository at this point in the history
  • Loading branch information
rohandev committed Aug 20, 2020
1 parent 838d348 commit 2dcce5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eb_sqs/worker/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class WorkerService(object):

def process_queues(self, queue_names):
# type: (list) -> None
self.write_healthcheck_file()

logger.debug('[django-eb-sqs] Connecting to SQS: {}'.format(', '.join(queue_names)))

sqs = boto3.resource(
Expand Down Expand Up @@ -73,11 +75,9 @@ def process_queues(self, queue_names):
self.process_messages(queues, worker, static_queues)

def process_messages(self, queues, worker, static_queues):

self.write_healthcheck_file()
# type: (list, Worker, list) -> None
last_healthcheck_time = timezone.now()

# type: (list, Worker, list) -> None
for queue in queues:
try:
messages = self.poll_messages(queue)
Expand Down

0 comments on commit 2dcce5a

Please sign in to comment.