-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
context
parameter for @app.schedule
lambdas
#856
Comments
Unfortunately, I do not think we would be able to expand the signature to include a context along with an event. However, the from chalice import Chalice
from chalice.app import Rate
app = Chalice(app_name='ping')
@app.schedule(Rate(1, Rate.MINUTES))
def index(event):
print(app.lambda_context)
return {'hello': 'world'} The one thing I did notice though is that the As to renaming |
The Could we just add a |
I would be fine with that as well. |
It would be nice to add |
Currently we do not provide
context
to@app.schedule
lambdas. It may be useful in some cases when the user wants to know who I am and maybe check remaining times.To be backward compatible, the
ScheduledEventHandler.__call__
needs to check client code's signature to support 1-param version (event
) and 2-param version (event
,context
) client code.By the way, the
event
in@app.schedule
is different fromevent
in@app.lambda_function
, which may arise confusion. Maybe we can rename the parameter name to things likeschedule_event
orcloudwatch_event
?The text was updated successfully, but these errors were encountered: