Closed
Description
A recent commit (afd23d7), added types to the various decorators. In particular, the @app.schedule
decorator requires expression
to be a str
, which means that it no longer accepts the object type Rate
or Cron
.
I used to be able to do this (and the Chalice documentation shows this example as well)
@app.schedule(Rate(1, unit=Rate.HOURS), name=f"send_call_reminders-{ENV}")
Now, I have to add a to_string()
call as follows:
@app.schedule(Rate(1, unit=Rate.HOURS).to_string(), name=f"send_call_reminders-{ENV}")
I'm thinking the type for the schedule
decorator should probably be Union[str, ScheduleExpression]
.