worker module¶
-
worker.
_redirect
()¶ Worker redirect to all operations on the DB tables.
Operates the DB on table specified, for list, add, modify and delete registers.
It uses the local static variables of the
worker.py
script asNETOR_HOME_DIRECTORY
andDB_PATH_NAME
, unless a full path name to a TinyDB database is specified.It supports the following parameters:
- specifying operations:
- l (list)
- a (add)
- m (modify)
- d (delete)
- table to operate with
- customer
- sites
- devices
- specifying DB full path name
Example:
../tinydb/scripts/worker.py -l customers /full/path/name/database.json
Logging to file ./log/tinydb.log
Returns: nothing - specifying operations: