Commit Graph

11 Commits

Author SHA1 Message Date
Tomasz Sowa bcb009b606 print version information if running with -v parameter 2022-07-03 14:25:23 +02:00
Tomasz Sowa da2dec447b allow to specify how many times we can try to connect to the database at startup
add config options:
db_startup_connection_max_attempts - default 0 (infinite)
db_startup_connection_attempt_delay - delay in seconds between attempts (default 5)

BREAKING CHANGE: WINIX_PLUGIN_INIT plugin message requires to set result status,
you have to set the result status to true (env.res) if your
plugin was initialized correctly, otherwise winix will not start
2022-04-29 06:17:16 +02:00
Tomasz Sowa 64e5114947 allow to read environment variables as config parameters
Environment variables must be prefixed with winix_ to be loaded by winix.
The winix_ prefix is then removed and the key value converted to lowercase.

Sample:
evn WINIX_MY_OPTION=TEST123test winix -c config_file

This will add my_option to the config with value TEST123test.
Environment variables are read last so they will overwrite the values
from the configuration files.
2022-04-16 21:50:23 +02:00
Tomasz Sowa 4f8b5e649a recognize startup parameters
Usage: winix [options]
  -c             : a path to the config file
  --config       : a path to the config file
  -h             : print usage information
  --help         : print usage information
  -?             : print usage information

While here:
- let it be possible to parse multiple configs,
- fix: some error messages were not printed at startup.
2022-04-16 18:38:30 +02:00
Tomasz Sowa 1d18b7fa12 - updated to the new pikotools api (child spaces were removed)
some plugins need to be fixed yet: ticket, gallery, group, menu
- added current user to default models as "user"
- renamed in User: super_user -> is_super_user, env -> admin_env, pass_hash_salted -> is_pass_hash_salted
- now Users class has a WinixModel as a base class
  some plugin calls have to be fixed yet
- added UserWrapper model with a pointer to User class
- removed from ItemContent: methods for accessing 'meta' and 'admin_meta', now ezc can iterate through Space classes
- fixed in env winix function: if there is "changeuser" parameter then we should only switch the user (not save anything)
2021-06-27 23:31:50 +02:00
Tomasz Sowa 8bb585d97d updated to the new pikotools api: changed utf8 functions PascalCase to snake_case 2021-05-21 00:41:27 +02:00
Tomasz Sowa e48a28a5c8 namespace PT renamed to pt 2021-05-20 20:59:12 +02:00
Tomasz Sowa 491dd27ebf some work in the new api:
- log_level and save_each_line moved from Log to FileLog
- other fixes in loggers
- DirContainer from Dirs and LoadAvg had no dependencies set




git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1148 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-21 22:53:24 +00:00
Tomasz Sowa 89d303f375 some work on dependency injection
git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1147 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-21 17:51:15 +00:00
Tomasz Sowa a2ffc1e81c start working on 0.7.x branch
- added FileLog which stores content to the file log
- now Log is only a wrapper - it puts messages to the local buffer and when logsave is used then the buffer is put to FileLog
- new base classes:
  WinixBase (Log, Config*, Synchro*)
  WinixModel : public WinixBase (morm::ModelConnector*, Plugin*)
  WinixSystem : public WinixModel (System*)
  WinixRequest : public WinixSystem (SLog, Cur*)
- singletons: log, slog, plugin are depracated - now references to them are in base classses (WinixBase, WinixModel)
- DbBase,  DbConn and Db are depracated - now we are using Morm project (in WinixModel there is a model_connector pointer)
  each thread will have its own ModelConnector





git-svn-id: svn://ttmath.org/publicrep/winix/branches/0.7.x@1146 e52654a7-88a9-db11-a3e9-0013d4bc506e
2018-11-21 11:03:53 +00:00
Tomasz Sowa 145efe937c moved winix directories to winixdsubdirectory
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1028 e52654a7-88a9-db11-a3e9-0013d4bc506e
2016-03-17 08:26:02 +00:00