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
Matteo Sessa
2016-07-08 16:58:34 +1000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
03a650a88ab6ca27de027aaf0b83fb8dc29c0489
03a650a8
1 parent
1b44d9f7
4-space indentation fix
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
kappa/event_source/s3.py
kappa/event_source/s3.py
View file @
03a650a
...
...
@@ -44,12 +44,12 @@ class S3EventSource(kappa.event_source.base.EventSource):
# Add S3 key filters
if
'key_filters'
in
self
.
_config
:
filters_spec
=
{
'Key'
:
{
'FilterRules'
:
[]
}
}
for
filter
in
self
.
_config
[
'key_filters'
]:
if
'type'
in
filter
and
'value'
in
filter
and
filter
[
'type'
]
in
(
'prefix'
,
'suffix'
):
rule
=
{
'Name'
:
filter
[
'type'
],
'Value'
:
filter
[
'value'
]
}
filters_spec
[
'Key'
][
'FilterRules'
]
.
append
(
rule
)
notification_spec
[
'LambdaFunctionConfigurations'
][
0
][
'Filter'
]
=
filters_spec
filters_spec
=
{
'Key'
:
{
'FilterRules'
:
[]
}
}
for
filter
in
self
.
_config
[
'key_filters'
]:
if
'type'
in
filter
and
'value'
in
filter
and
filter
[
'type'
]
in
(
'prefix'
,
'suffix'
):
rule
=
{
'Name'
:
filter
[
'type'
],
'Value'
:
filter
[
'value'
]
}
filters_spec
[
'Key'
][
'FilterRules'
]
.
append
(
rule
)
notification_spec
[
'LambdaFunctionConfigurations'
][
0
][
'Filter'
]
=
filters_spec
try
:
response
=
self
.
_s3
.
call
(
...
...
Please
register
or
login
to post a comment