Skip to content

Commit

Permalink
apply enable check on run
Browse files Browse the repository at this point in the history
  • Loading branch information
bry-c committed Mar 7, 2019
1 parent 67d4da2 commit 77ca766
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions paper_cup/paper_cup.py
Expand Up @@ -49,6 +49,10 @@ def _add_more_data(self, message, action):

def run(self):
"""Read the message in queue and use the class that will handle the action."""

if not self.PC_ENABLE:
return False

queue = self.sqs.get_queue_by_name(self.PC_QUEUE)
messages = queue.receive_messages(WaitTimeSeconds=20, MaxNumberOfMessages=10, VisibilityTimeout=30)
# get all the cosumer classes that will handle actions
Expand Down

0 comments on commit 77ca766

Please sign in to comment.