-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.R
40 lines (33 loc) · 1.01 KB
/
app.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Launch the ShinyApp (Do not remove this comment)
# To deploy, run: rsconnect::deployApp()
# Or use the blue button on top of this file
# Sys.setenv(
# "GOLEM_CONFIG_ACTIVE" = "dev"
# )
pkgload::load_all(export_all = FALSE, helpers = FALSE, attach_testthat = FALSE)
options("golem.app.prod" = TRUE)
cli::cat_rule("app.R")
se <- new.env()
connect(se)
datasets <- generate_datasets(
get_con(
se
)
)
# Run future
cli::cat_line("Start multisession")
library(promises)
library(future)
plan(multisession(workers = min(availableCores()-1, 8)))
# Run the application
run_app(
species_list = datasets[["species_list"]],
countries_mortalities_list = datasets[["countries_mortalities_list"]],
dataCatchment = datasets[["dataCatchment"]],
catchment_geom = datasets[["catchment_geom"]],
dataALL = datasets[["dataALL"]],
ices_geom = datasets[["ices_geom"]],
ices_division = datasets[["ices_division"]],
positive_catch_area = datasets[["positive_catch_area"]],
help_bubble_entries = get_help_bubble_entries()
)