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 as NETOR_HOME_DIRECTORY and DB_PATH_NAME, unless a full path name to a TinyDB database is specified.

It supports the following parameters:

  1. specifying operations:
    • l (list)
    • a (add)
    • m (modify)
    • d (delete)
  2. table to operate with
    • customer
    • sites
    • devices
  3. 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