I've set up a drake pipeline that generates a report at the end of the pipeline. I would like to trigger a slack notification every time a new report is created. For the report part of my plan I use the following:
report_plan <- drake::drake_plan(
report = rmarkdown::render(
knitr_in("alerts.Rmd"),
output_file = file_out("report.html"),
quiet = TRUE),
notification = target(slackr::slackr("A new vaccine report is ready"), trigger = trigger(change = file.info("report.html")$ctime)),
strings_in_dots = "literals"
)
The trigger on the notification target works, but in my dependency graph the notification target is just hanging out by itself:
Is there a better way to make the notification dependent on a new report being generated? Thanks!