<commit_before><commit_msg>Adds new lambda script to update job code<commit_after>#!/bin/bash
#
# Use lambda-update-code <function-name> <function-version>
# to upload a new code package and update the function latest.
#
# Used for caremen billing lambda functions.
#

if [ -z "$1" ]
  then
    echo "Error: no function name supplied"
    echo "Usage: lambda-update-code <function-name> <code-version>"
    echo "Example: lambda-update-code watchdog 0.18"
    exit
fi

if [ -z "$2" ]
  then
    echo "Error: no code version supplied"
    echo "Usage: lambda-update-code <function-name> <code-version>"
    echo "Example: lambda-update-code watchdog 0.18"
    exit
fi

echo "Updating $1 code to $2 ..."
aws lambda update-function-code --function-name $1 --zip-file fileb://target/spacedog-watchdog-$2-bundle.zip --no-publish

if [ "$?" != "0" ]
	then
		exit
fi

echo "Updating $1 description with $2 ..."
aws lambda update-function-configuration --function-name $1 --description "v$2"

if [ "$?" != "0" ]
    then
        exit
fi
{'fraction_non_alphanumeric': 0.14007782101167315, 'fraction_numerical': 0.017509727626459144, 'mean_word_length': 3.2520661157024793, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2466035', 'n_tokens_mistral': 345, 'n_tokens_neox': 334, 'n_words': 110}