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
Mitch Garnaat
2015-08-04 17:30:10 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
98fd70f960278f28cad341c48a7388c804ba94f9
98fd70f9
1 parent
a6836a82
Delete the log group when the function is deleted. Fixes #28
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
kappa/context.py
kappa/log.py
kappa/context.py
View file @
98fd70f
...
...
@@ -152,6 +152,7 @@ class Context(object):
def
delete
(
self
):
for
event_source
in
self
.
event_sources
:
event_source
.
remove
(
self
.
function
)
self
.
function
.
log
.
delete
()
self
.
function
.
delete
()
time
.
sleep
(
5
)
if
self
.
role
:
...
...
kappa/log.py
View file @
98fd70f
...
...
@@ -13,10 +13,12 @@
import
logging
LOG
=
logging
.
getLogger
(
__name__
)
from
botocore.exceptions
import
ClientError
import
kappa.aws
LOG
=
logging
.
getLogger
(
__name__
)
class
Log
(
object
):
...
...
@@ -61,3 +63,11 @@ class Log(object):
logStreamName
=
latest_stream
[
'logStreamName'
])
LOG
.
debug
(
response
)
return
response
[
'events'
]
def
delete
(
self
):
try
:
response
=
self
.
_log_svc
.
delete_log_group
(
logGroupName
=
self
.
log_group_name
)
LOG
.
debug
(
response
)
except
ClientError
:
LOG
.
debug
(
'unable to delete log group'
)
...
...
Please
register
or
login
to post a comment