Chris O'Brien05/04/2020, 3:56 AM
that is yesterday UTC time. I would love to use the prefect context to do this and this worked for me, but is there a better way?
within a Task is not recommended, and
should be treated as read-only (unless you are adding values to context through environment variable or the API). Why do you need to add this to context? You can always compute it within any task, as you did above:
run_date = prefect.context.date.date() - datetime.timedelta(days=1)
Chris O'Brien05/04/2020, 10:43 PM
available via context
Chris O'Brien05/04/2020, 10:54 PM