Skip to main content

AMON Tools for GISCE-ERP

Project description

AMON Library and utils to convert GISCE-ERP objects to AMON data

Install

$ pip install amoniak

Running amoniak

$ amoniak --help

Available commands

All the commands work with environment variables, see the next section for available options.

By default all commands work with RQ Queues, but it can be run in sync mode using environment variables (See working with RQ section) or with the parametter --no-async in the amoniak command.

  • Enqueue all AMON measures: Used to initialize Empowering Insight Engine Service.

    $ amoniak enqueue_all_amon_measures
  • Enqueue measures: Enqueue new measures for the contracts which have and etag searching the last measure created in the Insight Engine

    $ amoniak enqueue_measures
  • Enqueue contracts: Used to upload contracts. This command will upload firstly the updated contracts: the ones which have an etag and have been updated after the _updated. Then will upload new contracts: searching for the ones which have a smart metter and no etag in the contract and the contracte was created after the las _updated in the Insight Engine.

    $ amoniak enqueue_contracts

Running workers

Workers are the default RQ Workers but you must setup the necessary environment variables to work properly

To execute contracts’s tasks

$ rqworker contracts

To execute measures’s tasks

$ rq-worker measures

Working with environment variables

Empowering services

To work with Empowering services you must define the following environment variables:

  • EMPOWERING_COMPANY_ID

  • EMPOWERING_KEY_FILE

  • EMPOWERING_CERT_FILE (This can be the same as EMPOWERING_KEY_FILE)

If you want to work with empowering debug server you have to define EMPOWERING_DEBUG

Working with ERPPeek

  • PEEK_SERVER

  • PEEK_DB

  • PEEK_USER

  • PEEK_PASSWORD

Working with MongoDB

  • MONGODB_HOST

  • MONGODB_DATABASE

Working with Sentry

  • SENTRY_DSN

Be sure to use a synchronous protocol

Working with RQ

  • RQ_ASYNC

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amoniak-0.3.0.tar.gz (8.9 kB view details)

Uploaded Source

File details

Details for the file amoniak-0.3.0.tar.gz.

File metadata

  • Download URL: amoniak-0.3.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for amoniak-0.3.0.tar.gz
Algorithm Hash digest
SHA256 42a0d97fd8051eb69be494123e620b25c40f51c3aa3152f7f59b2dc0deaa26b6
MD5 a366ab4a5f75a0702a9114749768eb0d
BLAKE2b-256 01adb71e3b285102acf742ba96bc71c1d1f8fcba746f03af6b2b5d5e9da29ae3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page