[](https://travis-ci.org/USGS-EROS/lcmap-change-worker)
# lcmap-change-worker
worker for initiating change detection jobs, and sending results to the data store
## Install
```bash
# locally
$ pip install -e.
```
## Usage
```bash
# lcw-listen is available following install with pip
$ lcw-listen
# lcw-test-send will send stdin to the LCW_RABBIT_EXCHANGE
$ lcw-test-send '{"some":"message"}'
```
```python
# same effect as lcw-listen
from cw import __listener__
__listener__.main()
# useful for sending test messages only.
from cw import __sender__
message = '{"x": 123, "y": 456, "algorithm": "pyccd-beta1", "result": "OUTPUT"}'
__sender__.main(message)
```
## Configuration
landsat-change-worker is configurable with the following environment variables
| Variable | Default | Description |
| --- | --- | --- |
| `LCW_RABBIT_HOST` | localhost | RabbitMQ Host |
| `LCW_RABBIT_PORT` | 5672 | RabbitMQ Port |
| `LCW_RABBIT_QUEUE` | local.lcmap.changes.worker | Queue for LCW to listen for messages |
| `LCW_RABBIT_EXCHANGE` | local.lcmap.changes.worker | Exchange for LCW to publish messages |
| `LCW_RABBIT_RESULT_ROUTING_KEY` | change-detection-result | Routing key used when publishing change detection result messages |
| `LCW_RABBIT_SSL` | False | Enable/Disable SSL. True/False |
## Developing & Testing
Get the local environment ready for development and testing.
```bash
$ git clone git@github.com:usgs-eros/lcmap-change-worker
$ cd lcmap-change-worker
$ virtualenv -p python3 .venv
$ . .venv/bin/activate
$ pip install -e .[test]
$ pip install -e .[dev]
```
Run tests:
```bash
# the right way
$ python setup.py test
# alternatively
$ pytest
```
## Deploying
# lcmap-change-worker
worker for initiating change detection jobs, and sending results to the data store
## Install
```bash
# locally
$ pip install -e.
```
## Usage
```bash
# lcw-listen is available following install with pip
$ lcw-listen
# lcw-test-send will send stdin to the LCW_RABBIT_EXCHANGE
$ lcw-test-send '{"some":"message"}'
```
```python
# same effect as lcw-listen
from cw import __listener__
__listener__.main()
# useful for sending test messages only.
from cw import __sender__
message = '{"x": 123, "y": 456, "algorithm": "pyccd-beta1", "result": "OUTPUT"}'
__sender__.main(message)
```
## Configuration
landsat-change-worker is configurable with the following environment variables
| Variable | Default | Description |
| --- | --- | --- |
| `LCW_RABBIT_HOST` | localhost | RabbitMQ Host |
| `LCW_RABBIT_PORT` | 5672 | RabbitMQ Port |
| `LCW_RABBIT_QUEUE` | local.lcmap.changes.worker | Queue for LCW to listen for messages |
| `LCW_RABBIT_EXCHANGE` | local.lcmap.changes.worker | Exchange for LCW to publish messages |
| `LCW_RABBIT_RESULT_ROUTING_KEY` | change-detection-result | Routing key used when publishing change detection result messages |
| `LCW_RABBIT_SSL` | False | Enable/Disable SSL. True/False |
## Developing & Testing
Get the local environment ready for development and testing.
```bash
$ git clone git@github.com:usgs-eros/lcmap-change-worker
$ cd lcmap-change-worker
$ virtualenv -p python3 .venv
$ . .venv/bin/activate
$ pip install -e .[test]
$ pip install -e .[dev]
```
Run tests:
```bash
# the right way
$ python setup.py test
# alternatively
$ pytest
```
## Deploying
Release files for lcmap-change-worker 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lcmap-change-worker-0.1.0.tar.gz | 7.6 kB | Details |
Release files / lcmap-change-worker-0.1.0.tar.gz
| Download URL | lcmap-change-worker-0.1.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8498b7e122971404850e37b201d2290a06dec769bd7dd4eaaed430ed5ef66674
|
|
BLAKE2b-256 checksum How to use checksums |
2b3e4b015766e95a81735fd1926592d68bd3a2f5e88fa2020e0854428a6d609c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |