...
This commit is contained in:
@@ -58,11 +58,11 @@ pub fn get(args ArgsGet) !&CometBFT {
|
||||
|
||||
// register the config for the future
|
||||
pub fn set(o CometBFT) ! {
|
||||
set_in_mem(o)!
|
||||
cometbft_default = o.name
|
||||
mut o2 := set_in_mem(o)!
|
||||
cometbft_default = o2.name
|
||||
mut context := base.context()!
|
||||
mut r := context.redis()!
|
||||
r.hset('context:cometbft', o.name, json.encode(o))!
|
||||
r.hset('context:cometbft', o2.name, json.encode(o2))!
|
||||
}
|
||||
|
||||
// does the config exists?
|
||||
@@ -111,10 +111,11 @@ pub fn list(args ArgsList) ![]&CometBFT {
|
||||
}
|
||||
|
||||
// only sets in mem, does not set as config
|
||||
fn set_in_mem(o CometBFT) ! {
|
||||
fn set_in_mem(o CometBFT) !CometBFT {
|
||||
mut o2 := obj_init(o)!
|
||||
cometbft_global[o.name] = &o2
|
||||
cometbft_default = o.name
|
||||
cometbft_global[o2.name] = &o2
|
||||
cometbft_default = o2.name
|
||||
return o2
|
||||
}
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
|
||||
@@ -29,8 +29,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs {
|
||||
if installer.production {
|
||||
env = 'production'
|
||||
}
|
||||
res << startupmanager.ZProcessNewArgs
|
||||
{
|
||||
res << startupmanager.ZProcessNewArgs{
|
||||
name: 'meilisearch'
|
||||
cmd: 'meilisearch --no-analytics --http-addr ${installer.host}:${installer.port} --env ${env} --db-path ${installer.path} --master-key ${installer.masterkey}'
|
||||
startuptype: .zinit
|
||||
|
||||
@@ -58,11 +58,11 @@ pub fn get(args ArgsGet) !&MeilisearchInstaller {
|
||||
|
||||
// register the config for the future
|
||||
pub fn set(o MeilisearchInstaller) ! {
|
||||
set_in_mem(o)!
|
||||
meilisearch_installer_default = o.name
|
||||
mut o2 := set_in_mem(o)!
|
||||
meilisearch_installer_default = o2.name
|
||||
mut context := base.context()!
|
||||
mut r := context.redis()!
|
||||
r.hset('context:meilisearch_installer', o.name, json.encode(o))!
|
||||
r.hset('context:meilisearch_installer', o2.name, json.encode(o2))!
|
||||
}
|
||||
|
||||
// does the config exists?
|
||||
@@ -111,10 +111,11 @@ pub fn list(args ArgsList) ![]&MeilisearchInstaller {
|
||||
}
|
||||
|
||||
// only sets in mem, does not set as config
|
||||
fn set_in_mem(o MeilisearchInstaller) ! {
|
||||
fn set_in_mem(o MeilisearchInstaller) !MeilisearchInstaller {
|
||||
mut o2 := obj_init(o)!
|
||||
meilisearch_installer_global[o.name] = &o2
|
||||
meilisearch_installer_default = o.name
|
||||
meilisearch_installer_global[o2.name] = &o2
|
||||
meilisearch_installer_default = o2.name
|
||||
return o2
|
||||
}
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
|
||||
@@ -15,8 +15,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs {
|
||||
podman run --name ${cfg.container_name} -e POSTGRES_USER=${cfg.user} -e POSTGRES_PASSWORD=\"${cfg.password}\" -v ${cfg.volume_path}:/var/lib/postgresql/data -p ${cfg.port}:5432 --health-cmd=\"pg_isready -U ${cfg.user}\" postgres:latest
|
||||
"
|
||||
|
||||
res << startupmanager.ZProcessNewArgs
|
||||
{
|
||||
res << startupmanager.ZProcessNewArgs{
|
||||
name: 'postgresql'
|
||||
cmd: cmd
|
||||
startuptype: .zinit
|
||||
|
||||
@@ -53,11 +53,11 @@ pub fn get(args ArgsGet) !&Postgresql {
|
||||
|
||||
// register the config for the future
|
||||
pub fn set(o Postgresql) ! {
|
||||
set_in_mem(o)!
|
||||
postgresql_default = o.name
|
||||
mut o2 := set_in_mem(o)!
|
||||
postgresql_default = o2.name
|
||||
mut context := base.context()!
|
||||
mut r := context.redis()!
|
||||
r.hset('context:postgresql', o.name, json.encode(o))!
|
||||
r.hset('context:postgresql', o2.name, json.encode(o2))!
|
||||
}
|
||||
|
||||
// does the config exists?
|
||||
@@ -106,10 +106,11 @@ pub fn list(args ArgsList) ![]&Postgresql {
|
||||
}
|
||||
|
||||
// only sets in mem, does not set as config
|
||||
fn set_in_mem(o Postgresql) ! {
|
||||
fn set_in_mem(o Postgresql) !Postgresql {
|
||||
mut o2 := obj_init(o)!
|
||||
postgresql_global[o.name] = &o2
|
||||
postgresql_default = o.name
|
||||
postgresql_global[o2.name] = &o2
|
||||
postgresql_default = o2.name
|
||||
return o2
|
||||
}
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
|
||||
@@ -7,8 +7,7 @@ import os
|
||||
|
||||
fn startupcmd() ![]startupmanager.ZProcessNewArgs {
|
||||
mut res := []startupmanager.ZProcessNewArgs{}
|
||||
res << startupmanager.ZProcessNewArgs
|
||||
{
|
||||
res << startupmanager.ZProcessNewArgs{
|
||||
name: 'qdrant'
|
||||
cmd: 'sleep 5 && qdrant --config-path ${os.home_dir()}/hero/var/qdrant/config.yaml'
|
||||
startuptype: .zinit
|
||||
|
||||
@@ -58,11 +58,11 @@ pub fn get(args ArgsGet) !&QDrant {
|
||||
|
||||
// register the config for the future
|
||||
pub fn set(o QDrant) ! {
|
||||
set_in_mem(o)!
|
||||
qdrant_installer_default = o.name
|
||||
mut o2 := set_in_mem(o)!
|
||||
qdrant_installer_default = o2.name
|
||||
mut context := base.context()!
|
||||
mut r := context.redis()!
|
||||
r.hset('context:qdrant_installer', o.name, json.encode(o))!
|
||||
r.hset('context:qdrant_installer', o2.name, json.encode(o2))!
|
||||
}
|
||||
|
||||
// does the config exists?
|
||||
@@ -111,10 +111,11 @@ pub fn list(args ArgsList) ![]&QDrant {
|
||||
}
|
||||
|
||||
// only sets in mem, does not set as config
|
||||
fn set_in_mem(o QDrant) ! {
|
||||
fn set_in_mem(o QDrant) !QDrant {
|
||||
mut o2 := obj_init(o)!
|
||||
qdrant_installer_global[o.name] = &o2
|
||||
qdrant_installer_default = o.name
|
||||
qdrant_installer_global[o2.name] = &o2
|
||||
qdrant_installer_default = o2.name
|
||||
return o2
|
||||
}
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
|
||||
@@ -22,8 +22,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs {
|
||||
}
|
||||
|
||||
mut res := []startupmanager.ZProcessNewArgs{}
|
||||
res << startupmanager.ZProcessNewArgs
|
||||
{
|
||||
res << startupmanager.ZProcessNewArgs{
|
||||
name: 'zdb'
|
||||
cmd: cmd
|
||||
startuptype: .zinit
|
||||
|
||||
@@ -53,11 +53,11 @@ pub fn get(args ArgsGet) !&ZeroDB {
|
||||
|
||||
// register the config for the future
|
||||
pub fn set(o ZeroDB) ! {
|
||||
set_in_mem(o)!
|
||||
zerodb_default = o.name
|
||||
mut o2 := set_in_mem(o)!
|
||||
zerodb_default = o2.name
|
||||
mut context := base.context()!
|
||||
mut r := context.redis()!
|
||||
r.hset('context:zerodb', o.name, json.encode(o))!
|
||||
r.hset('context:zerodb', o2.name, json.encode(o2))!
|
||||
}
|
||||
|
||||
// does the config exists?
|
||||
@@ -106,10 +106,11 @@ pub fn list(args ArgsList) ![]&ZeroDB {
|
||||
}
|
||||
|
||||
// only sets in mem, does not set as config
|
||||
fn set_in_mem(o ZeroDB) ! {
|
||||
fn set_in_mem(o ZeroDB) !ZeroDB {
|
||||
mut o2 := obj_init(o)!
|
||||
zerodb_global[o.name] = &o2
|
||||
zerodb_default = o.name
|
||||
zerodb_global[o2.name] = &o2
|
||||
zerodb_default = o2.name
|
||||
return o2
|
||||
}
|
||||
|
||||
pub fn play(mut plbook PlayBook) ! {
|
||||
|
||||
Reference in New Issue
Block a user