[sty] main [mod] main:session prolongation
This commit is contained in:
parent
0e8e9ec68b
commit
e33fb8bc53
|
|
@ -366,8 +366,10 @@ async function main(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch (args["action"]) {
|
switch (args["action"])
|
||||||
default: {
|
{
|
||||||
|
default:
|
||||||
|
{
|
||||||
lib_plankton.log.error(
|
lib_plankton.log.error(
|
||||||
"main_invalid_action",
|
"main_invalid_action",
|
||||||
{
|
{
|
||||||
|
|
@ -376,7 +378,8 @@ async function main(
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "conf-schema": {
|
case "conf-schema":
|
||||||
|
{
|
||||||
process.stdout.write(
|
process.stdout.write(
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
_zeitbild.conf.schema(),
|
_zeitbild.conf.schema(),
|
||||||
|
|
@ -388,7 +391,8 @@ async function main(
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "conf-expose": {
|
case "conf-expose":
|
||||||
|
{
|
||||||
process.stdout.write(
|
process.stdout.write(
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
_zeitbild.conf.get(),
|
_zeitbild.conf.get(),
|
||||||
|
|
@ -400,7 +404,8 @@ async function main(
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "api-doc": {
|
case "api-doc":
|
||||||
|
{
|
||||||
lib_plankton.log.set_main_logger([]);
|
lib_plankton.log.set_main_logger([]);
|
||||||
const rest_subject : lib_plankton.rest_http.type_rest = _zeitbild.api.make();
|
const rest_subject : lib_plankton.rest_http.type_rest = _zeitbild.api.make();
|
||||||
process.stdout.write(
|
process.stdout.write(
|
||||||
|
|
@ -412,7 +417,8 @@ async function main(
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "fill": {
|
case "fill":
|
||||||
|
{
|
||||||
await data_init(
|
await data_init(
|
||||||
lib_plankton.json.decode(
|
lib_plankton.json.decode(
|
||||||
await lib_plankton.file.read(args.data_path)
|
await lib_plankton.file.read(args.data_path)
|
||||||
|
|
@ -421,16 +427,23 @@ async function main(
|
||||||
process.stdout.write("-- done\n");
|
process.stdout.write("-- done\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "serve": {
|
case "serve":
|
||||||
|
{
|
||||||
// prepare database
|
// prepare database
|
||||||
await _zeitbild.database.check();
|
await _zeitbild.database.check();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @todo clear old sessions
|
||||||
|
*/
|
||||||
|
|
||||||
await lib_plankton.session.setup(
|
await lib_plankton.session.setup(
|
||||||
{
|
{
|
||||||
"data_chest": (
|
"data_chest": (
|
||||||
_zeitbild.conf.get().session_management.in_memory
|
_zeitbild.conf.get().session_management.in_memory
|
||||||
? lib_plankton.storage.memory.implementation_chest<lib_plankton.session.type_session>({})
|
?
|
||||||
: lib_plankton.call.convey(
|
lib_plankton.storage.memory.implementation_chest<lib_plankton.session.type_session>({})
|
||||||
|
:
|
||||||
|
lib_plankton.call.convey(
|
||||||
lib_plankton.storage.sql_table_common.chest(
|
lib_plankton.storage.sql_table_common.chest(
|
||||||
{
|
{
|
||||||
"database_implementation": _zeitbild.database.get_implementation(),
|
"database_implementation": _zeitbild.database.get_implementation(),
|
||||||
|
|
@ -452,6 +465,7 @@ async function main(
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
"default_lifetime": _zeitbild.conf.get().session_management.lifetime,
|
"default_lifetime": _zeitbild.conf.get().session_management.lifetime,
|
||||||
|
"default_prolongation": _zeitbild.conf.get().session_management.prolongation,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue