Skip to content

Commit

Permalink
Merge pull request #394 from rivm-syso/Issue_392
Browse files Browse the repository at this point in the history
Merging hotfix from master into dev
  • Loading branch information
jspijker authored Oct 30, 2024
2 parents f4918eb + 859f571 commit e44f1c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ RUN install2.r --error --skipinstalled --ncpus -1 \
shinyalert \
datawizard \
shinybusy \
filelock \
colorBlindness \
&& rm -rf /tmp/downloaded_packages

Expand Down
16 changes: 14 additions & 2 deletions global.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ library(shiny.i18n)
# Databases (essential)
library(RSQLite)
library(pool)
library(filelock)

# Visualisation
library(leaflet) # For maps
Expand All @@ -53,6 +54,7 @@ library(sf)
library(logger)
#log_threshold(loglevel)

# AT libraries
library(samanapir)
library(ATdatabase)

Expand Down Expand Up @@ -80,8 +82,18 @@ db_script <- here::here("scripts","container_data_prep.R")
system2("Rscript", db_script, wait = TRUE)

# launch queue manager
qm_script <- here::here("scripts","queue_manager.R")
system2("Rscript", qm_script, wait = FALSE)

lockfile <- file.path(get_database_dirname(), "lock")
lfres <- lock(lockfile, timeout = 1000)

if(!is.null(lfres)) {
log_info("Starting queue manager")
qm_script <- here::here("scripts","queue_manager.R")
system2("Rscript", qm_script, wait = FALSE)
} else {
log_info("Queue manager not started")
}


# Set language and date options ====
options(encoding = "UTF-8") # Standard UTF-8 encoding
Expand Down

0 comments on commit e44f1c0

Please sign in to comment.