CLI tool for the Shopcloud EventBus
Project description
Shopcloud-EventBus
Async Processing, write to Log an Event and send it to a Queue
graph TD;
AppEngine-->Log;
Log-->EventBus;
EventBus-->AppEngine;
Usage
use for example the shopcloud-django-toolbox library
from shopcloud_django_toolbox import Event
event = Event(
name="de.talk-point.platform/module/model/sync",
model=self,
)
event.add_task(
queue="default",
url=f"moduke/api/model/{self.id}/action/",
json={}
)
event.fire()
Install
Services
$ gcloud services enable cloudtasks.googleapis.com --project="test-eventbus-project"
$ gcloud pubsub topics create events --project='test-eventbus-project'
$ gcloud tasks queues create default --project='test-eventbus-project' --location='europe-west3'
Log Sink
Create a log sink with the following filter resource.type="gae_app" "event-fire"
$ eventbus --help
$ eventbus deploy
Development
$ python3 setup.py install
$ python3 -m shopcloud_eventbus -d init --project="test-eventbus-project" --region="europe-west3" --app-endpoint="https://test-eventbus-project.ey.r.appspot.com" --secrethub-endpoint-user="talk-point/app-eventbus-test/production/evenbus-user" --secrethub-endpoint-pwd="talk-point/app-eventbus-test/production/evenbus-pwd"
$ python3 -m shopcloud_eventbus -d deploy
dann kann das Script getestet werden per
$ cd .eventbus
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ functions-framework --target main_http --debug
oder deployen und eine Test-Message durchsenden
Deploy
$ rm -rf build dist
$ pip3 install wheel twine
$ python3 setup.py sdist bdist_wheel
$ twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for shopcloud_eventbus-1.0.3-py3.11.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 176eff5137461a44957bcf2890bb0673b558c77e2caec1b783e03bb706fed7e4 |
|
MD5 | df522b3a447f191dfdc5c5a2b44e9c66 |
|
BLAKE2b-256 | 49ff3f62eee9f6a80f5198c0c985246bc1e7f1c92126b3e779005986c6d34ba0 |
Close
Hashes for shopcloud_eventbus-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb04b8a7cc3602f31ec7022721f23a24dd97fe8de4f09151c7bd03c78f116161 |
|
MD5 | 4006f0ccb9d46ed6fdb3a17e12a98b47 |
|
BLAKE2b-256 | 8dc5513c9d7e44662c8e0fd4cfe91331647e7b062d9391883934a1459ebb0779 |