refactor: инициация схемы - при загрузке модуля, вместо загрузки пакетов через library: box and namespacing

This commit is contained in:
2026-06-15 16:40:26 +03:00
parent e6e15392c3
commit d73699a1d1
2 changed files with 24 additions and 24 deletions

View File

@@ -1,10 +1,16 @@
.on_load = function(ns) {
check_and_init_scheme()
}
#' @export
#' @description костыли для упрощения работы себе
set_global_options = function(
SYMBOL_DELIM = "; ",
APP.DEBUG = FALSE,
shiny.host = "127.0.0.1",
shiny.port = 1338,
# shiny.host = "127.0.0.1",
# shiny.port = 1338,
...
) {
@@ -29,9 +35,8 @@ set_global_options = function(
SYMBOL_DELIM = SYMBOL_DELIM,
# form.db_path = config::get("form_db_path"),
APP.DEBUG = APP.DEBUG,
# APP.FILE_DB = APP.FILE_DB,
shiny.host = shiny.host,
shiny.port = shiny.port,
# shiny.host = shiny.host,
# shiny.port = shiny.port,
...
)
}
@@ -45,7 +50,9 @@ check_and_init_scheme = function() {
cli::cli_inform(c("*" = "проверка схемы..."))
options(box.path = here::here())
box::use(R/modules/db[local_db_backup])
box::use(
R/modules/db[local_db_backup]
)
# список файлов, изменение которых, приведут к переинициализиации схемы
files_to_watch <- c(