Showing
1 changed file
with
12 additions
and
5 deletions
... | @@ -13,13 +13,13 @@ | ... | @@ -13,13 +13,13 @@ |
13 | # See the License for the specific language governing permissions and | 13 | # See the License for the specific language governing permissions and |
14 | # limitations under the License. | 14 | # limitations under the License. |
15 | 15 | ||
16 | +import hashlib | ||
16 | import logging | 17 | import logging |
17 | import os | 18 | import os |
18 | -import zipfile | ||
19 | -import time | ||
20 | import shutil | 19 | import shutil |
21 | -import hashlib | 20 | +import time |
22 | import uuid | 21 | import uuid |
22 | +import zipfile | ||
23 | 23 | ||
24 | from botocore.exceptions import ClientError | 24 | from botocore.exceptions import ClientError |
25 | 25 | ||
... | @@ -274,9 +274,16 @@ class Function(object): | ... | @@ -274,9 +274,16 @@ class Function(object): |
274 | def exists(self): | 274 | def exists(self): |
275 | return self._get_response() | 275 | return self._get_response() |
276 | 276 | ||
277 | - def tail(self): | 277 | + def tail(self, attempt=0): |
278 | - LOG.info('tailing function: %s', self.name) | 278 | + try: |
279 | + LOG.debug('tailing function: %s', self.name) | ||
279 | return self.log.tail() | 280 | return self.log.tail() |
281 | + except Exception, e: | ||
282 | + if attempt > 10: | ||
283 | + return e | ||
284 | + | ||
285 | + time.sleep(attempt) | ||
286 | + return self.tail(attempt + 1) | ||
280 | 287 | ||
281 | def list_aliases(self): | 288 | def list_aliases(self): |
282 | LOG.info('listing aliases of %s', self.name) | 289 | LOG.info('listing aliases of %s', self.name) | ... | ... |
-
Please register or login to post a comment