Skip to content

Commit

Permalink
Merge pull request #377 from camptocamp/await_message
Browse files Browse the repository at this point in the history
Improve await_message
  • Loading branch information
Patrick Valsecchi authored Aug 6, 2018
2 parents 74b41f7 + 6181b92 commit df07896
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ pykwalify==1.6.1
PyYAML==3.12
Shapely==1.6.4.post1
six==1.11.0
tilecloud==0.5.1
tilecloud==1.0.1
python-dateutil==2.6.1 # rq.filter: <2.7.0
5 changes: 3 additions & 2 deletions tilecloud_chain/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from datetime import datetime
from getpass import getuser
from argparse import ArgumentParser
import time

import boto3
from c2cwsgiutils import stats
Expand Down Expand Up @@ -417,8 +418,8 @@ def _get_tilestore_for_layer(self, layer):

def await_message(queue): # pragma: no cover
try:
while queue.receive_messages(VisibilityTimeout=0, WaitTimeSeconds=20) is None:
pass
# Just sleep, the SQSTileStore will try again after that...
time.sleep(10)
except KeyboardInterrupt:
raise StopIteration

Expand Down

0 comments on commit df07896

Please sign in to comment.