Toggle navigation
Toggle navigation
This project
Loading...
Sign in
서승완
/
kappa
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Rich Jones
2015-07-08 18:03:17 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bc8368d8adbebcfa349b9adffd2af6c01dc67d7e
bc8368d8
1 parent
ca5d3e07
Fixes #23 - recursive tailing hur hur
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
kappa/function.py
kappa/function.py
View file @
bc8368d
...
...
@@ -13,6 +13,7 @@
import
logging
import
os
import
time
import
zipfile
from
botocore.exceptions
import
ClientError
...
...
@@ -92,9 +93,17 @@ class Function(object):
self
.
_log
=
kappa
.
log
.
Log
(
self
.
_context
,
log_group_name
)
return
self
.
_log
def
tail
(
self
):
LOG
.
debug
(
'tailing function:
%
s'
,
self
.
name
)
return
self
.
log
.
tail
()
def
tail
(
self
,
attempt
=
0
):
try
:
LOG
.
debug
(
'tailing function:
%
s'
,
self
.
name
)
log_result
=
self
.
log
.
tail
()
return
log_result
except
Exception
,
e
:
if
attempt
>
10
:
return
e
else
:
time
.
sleep
(
attempt
)
return
self
.
tail
(
attempt
+
1
)
def
_zip_lambda_dir
(
self
,
zipfile_name
,
lambda_dir
):
LOG
.
debug
(
'_zip_lambda_dir: lambda_dir=
%
s'
,
lambda_dir
)
...
...
Please
register
or
login
to post a comment