I have a shiny
application which updates each night via rsconnect::deployApp
using a batch file and scheduled task. This process is currently functioning as intended, but currently the only way to confirm the success of the entire procedure is to visit the app and check if the timestamp is updated.
?deployApp
shows an on.failure
option which will call a function if the deployment fails. I have ideas of how to use this to send a notification if the deploy fails but I haven't been able to test it because I can't actually make the deployApp
function fail.
I have tried placing errors in the UI
but the app successfully deploys, despite being non-functional in the viewer and on shinyapps.io.
Is there a way to force the deployApp
function to fail so I am able to test the on.failure
function I am creating?
Here's a small shiny app borrowed from here if needed.
# Global variables can go here
n <- 200
# Define the UI
ui <- bootstrapPage(
numericInput('n', 'Number of obs', n),
plotOutput('plot')
)
# Define the server code
server <- function(input, output) {
output$plot <- renderPlot({
hist(runif(input$n))
})
}
# Return a Shiny app object
shinyApp(ui = ui, server = server)
Currently running R v. 4.0.2; rsconnect 0.8.16, shiny 1.5.0
Edit: I tried sneaking a q()
into the app. It for sure breaks the app but doesn't interfere with deployApp
. The search continues!