mirror of
https://github.com/simple-login/app.git
synced 2024-11-14 08:01:13 +01:00
3e0b7bb369
* feat: add protocol buffers for events * chore: add EventDispatcher * chore: add WebhookEvent class * chore: emit events * feat: initial version of event listener * chore: emit user plan change with new timestamp * feat: emit metrics + add alias status to create event * chore: add newrelic decorator to functions * fix: event emitter fixes * fix: take null end_time into account * fix: avoid double-commits * chore: move UserDeleted event to User.delete method * db: add index to sync_event created_at and taken_time columns * chore: add index to model
24 lines
510 B
Bash
Executable file
24 lines
510 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" || exit 1; pwd -P)"
|
|
REPO_ROOT=$(echo "${SCRIPT_DIR}" | sed 's:scripts::g')
|
|
|
|
DEST_DIR="${REPO_ROOT}/app/events/generated"
|
|
|
|
PROTOC=${PROTOC:-"protoc"}
|
|
|
|
if ! eval "${PROTOC} --version" &> /dev/null ; then
|
|
echo "Cannot find $PROTOC"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf "${DEST_DIR}"
|
|
mkdir -p "${DEST_DIR}"
|
|
|
|
pushd $REPO_ROOT || exit 1
|
|
|
|
eval "${PROTOC} --proto_path=proto --python_out=\"${DEST_DIR}\" --pyi_out=\"${DEST_DIR}\" proto/event.proto"
|
|
|
|
popd || exit 1
|