# delphi-dapd-apollo-sync-finalizer
## Description
This lambda changes unit of work (filter by unit_of_work_id) activity status to NOT_IN_PROGRESS.
This lambda will be triggered only if previous lambda in sf was failed

## Links
* [Source](https://github.com/theorchard/delphi-dapd-apollo-sync-finalizer)
* [JIRA](https://jenkins.apollo.stream/job/Delphi-projects/job/pipelines/job/delphi-dapd-apollo-sync-finalizer/)

## Usage
Prerequisites
* Installed python3.10
* Installed [aws_cli](https://aws.amazon.com/cli/)
* Working credentials in ~/.aws/credentials
* delphi dev or prod vpn connection estabilished for dependencies install

1) Install poetry for package management
```console
curl -sSL https://install.python-poetry.org | python3 -
```
2) Add poetry to PATH
```console
export PATH=$HOME/.local/bin:$PATH
```
3) Install project dependencies
```console
poetry install
```
4) Activate venv
```console
. .venv/bin/activate
```
5) Set mandatory environment variable (or use .env file)
```console
# example values
SLZDB_URI=slz_db_uri_here
ENVIRONMENT=dev
DEBUG=False
```
6) Run service
```console
python3.10 dapd_apollo_sync_finalizer/main.py
```
example event could be found in events/default.json
this entrypoint could be used for ide debugging
