Jose Diaz-Gonzalez

Merge remote-tracking branch 'Miserlou/tailwait'

......@@ -13,13 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import hashlib
import logging
import os
import zipfile
import time
import shutil
import hashlib
import time
import uuid
import zipfile
from botocore.exceptions import ClientError
......@@ -274,9 +274,16 @@ class Function(object):
def exists(self):
return self._get_response()
def tail(self):
LOG.info('tailing function: %s', self.name)
def tail(self, attempt=0):
try:
LOG.debug('tailing function: %s', self.name)
return self.log.tail()
except Exception, e:
if attempt > 10:
return e
time.sleep(attempt)
return self.tail(attempt + 1)
def list_aliases(self):
LOG.info('listing aliases of %s', self.name)
......