1.0.0 • Published 2 years ago

nori-croplands-import-processor v1.0.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
2 years ago

nori-croplands-import-processor

Overview

This service will be used to process croplands import uploads.

Local development

  1. Start the service with
yarn dev
  1. Execute the script
./scripts/local-success.sh

PubSub Helper Scripts

The scripts directory contains a few scripts to assist with testing. These scripts can be used for interacting with the pubsub topic/subscription associated with this service. Here are some sample commands to show how to interact with the scripts:

# publish messages to topic that should process successfully
NUM_OF_MESSAGES=5;
GCP_PROJECT=nori-experiments ./scripts/notify-success.sh $NUM_OF_MESSAGES
# publish messages to topic that should fail to process
NUM_OF_MESSAGES=2;
GCP_PROJECT=nori-experiments ./scripts/notify-failure.sh $NUM_OF_MESSAGES
# clear messages from dead letter queue
GCP_PROJECT=nori-experiments ./scripts/clear-dead-letters.sh

Building / Publishing docker images

A helper script is available to simplify the process for building and publishing docker images. The following snippet shows how to build and publish a docker image using this script

# IMAGE_TAG is an optional variable for specifying a tag for the docker image
# if IMAGE_TAG is not supplied, the tag "local" will be used instead
export IMAGE_TAG="<some tag for this image>"
./scripts/publish-docker-image.sh