do not merge command array

This commit is contained in:
Muayyad alsadi 2022-03-18 18:29:27 +03:00
parent 105c27c8dc
commit 1be41b46a5
7 changed files with 17 additions and 8 deletions

View File

@ -3,7 +3,12 @@
```
cp example.env local.env
cp example.local.env local.env
cp example.env .env
cat local.env
cat .env
echo "UID=$UID" >> .env
cat .env
podman-compose build
podman-compose run --rm --no-deps init
podman-compose up

View File

@ -14,7 +14,8 @@ services:
- /run
init:
read_only: true
userns_mode: keep-id
#userns_mode: keep-id
user: ${UID:-1000}
build:
context: ./containers/${NODE_IMG:-node16-runtime}
image: ${NODE_IMG:-node16-runtime}

View File

@ -1,2 +1,3 @@
REDIS_HOST=redis
WEB_LISTEN_PORT=3000
# pass UID= your IDE user

View File

@ -8,9 +8,9 @@ async function loop() {
try {
task_desc = JSON.parse(task_desc_s);
} catch (e) {
proj.logger.exception(e);
console.exception(e);
}
proj.logger.info("got task "+task_desc.func);
console.info("got task "+task_desc.func);
const func = task_desc.func;
const args = task_desc.args;
if (typeof(proj.tasks[func])!="function") {

View File

@ -7,7 +7,6 @@ import express from "express";
export async function start() {
const app = express();
app.use(proj.logger.express_logger);
const server = http.createServer(app);
// Routing
@ -17,6 +16,6 @@ export async function start() {
});
server.listen(proj.config.LISTEN_PORT, proj.config.LISTEN_HOST, function() {
proj.logger.warn(`listening at port ${proj.config.LISTEN_PORT}`);
console.warn(`listening at port ${proj.config.LISTEN_PORT}`);
});
}

View File

@ -9,7 +9,7 @@
"main": "index.js",
"type": "module",
"scripts": {
"cli": "nodemon -w lib -w index.js --es-module-specifier-resolution=node ./index.mjs"
"cli": "nodemon -w lib -w index.js --es-module-specifier-resolution=node ./index.js"
},
"dependencies": {
"express": "~4.16.4",

View File

@ -1167,6 +1167,9 @@ def rec_merge_one(target, source):
if key not in source:
continue
value2 = source[key]
if key == "command":
target[key] = value2
continue
if not isinstance(value2, type(value)):
value_type = type(value)
value2_type = type(value2)