闪亮的服务器免费版本超时不起作用

时间:2018-11-27 12:57:09

标签: r session server shiny timeout

我尝试使用此代码绕过免费版本中闪亮的服务器超时问题。但这不起作用。

inactivity <- "function idleTimer() {
var t = setTimeout(logout, 60000);
window.onmousemove = resetTimer; // catches mouse movements
window.onmousedown = resetTimer; // catches mouse movements
window.onclick = resetTimer;     // catches mouse clicks
window.onscroll = resetTimer;    // catches scrolling
window.onkeypress = resetTimer;  //catches keyboard actions

    function logout() {
      //close the window
    }

    function resetTimer() {
    clearTimeout(t);
    t = setTimeout(logout, 60000);  // time is in milliseconds (1000 is 1 second)
    }
    }
    idleTimer();"


ui <- fluidPage(
  tags$script(inactivity))

server <- function(session, input, output) {

  points <- eventReactive(input$recalc, {
    cbind(rnorm(40) * 2 + 13, rnorm(40) + 48)
  }, ignoreNULL = FALSE)
  })

shinyApp(ui, server)

我需要制作一个闪亮的应用程序至少要激活10分钟。假定此代码绕过免费版本的会话超时问题。但是1分钟后超时。 该怎么办?

0 个答案:

没有答案