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.2-py3.9.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 688f565a35bf8afbe4569d6696de13b643c859f9a1ca878b3460fc7d6cf579bc |
|
MD5 | 485d885cb052daa2ffb8e193b900fdf2 |
|
BLAKE2b-256 | 64cab9c8bb6cc98d8258c6c27e0422ce5e5dfb93a642091f82e36b9267b76b1c |
Close
Hashes for shopcloud_eventbus-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c99c5dd803630e75b8660d6773e65d6c73b9a7b0f2c7c2314afb98232a5958d |
|
MD5 | da385aecdaa20bd49e4fd0cfa483b5e8 |
|
BLAKE2b-256 | da8b8b113f901e744af151224133343ace9cdb766834c904be94f2156e2d6314 |