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