garnaat / kappa

What precedes Lambda
http://kappa.readthedocs.org/en/develop/
Apache License 2.0
902 stars 88 forks source link

S3 Event Source fails on update #32

Open ryansb opened 9 years ago

ryansb commented 9 years ago

The S3 event source causes any "update_event_sources" command to fail because it's missing a method.

Traceback (most recent call last):
  File "/home/ryansb/.pyenv/versions/hugo-lambda/bin/kappa", line 155, in <module>
    cli(obj={})
  File "/home/ryansb/.pyenv/versions/hugo-lambda/lib/python2.7/site-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/home/ryansb/.pyenv/versions/hugo-lambda/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/home/ryansb/.pyenv/versions/hugo-lambda/lib/python2.7/site-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ryansb/.pyenv/versions/hugo-lambda/lib/python2.7/site-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ryansb/.pyenv/versions/hugo-lambda/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/ryansb/.pyenv/versions/hugo-lambda/bin/kappa", line 150, in update_event_sources
    context.update_event_sources()
  File "/home/ryansb/.pyenv/versions/hugo-lambda/lib/python2.7/site-packages/kappa/context.py", line 123, in update_event_sources
    event_source.update(self.function)
AttributeError: 'S3EventSource' object has no attribute 'update'
garnaat commented 9 years ago

I think the update method just needs to call the add method.

josegonzalez commented 8 years ago

This can be closed as #33 was merged :)