Skip to main content

A python ColaboFlow.Go (CF.Go) puzzle for supporting execution of workflow tasks over the RabbitMQ broker

Project description

Run

Hosts

python3 create_host.py

# send a test message with the RabbitMQ CLI
# https://www.rabbitmq.com/management-cli.html
rabbitmqadmin publish exchange=amq.default routing_key=test payload="Hello, world from RabbitMQ CLI"

# delete the queue `colabo.flow.host.node`
rabbitmqadmin delete queue name=colabo.flow.host.node

# delete all the messages in the `colabo.flow.host.node` queue
rabbitmqadmin purge queue name=colabo.flow.host.node
rabbitmqadmin purge queue name=colabo.flow.host.terra-python
rabbitmqadmin purge queue name=colabo.flow.host.heartbeat

cd /Users/mprinc/data/development/colabo-zontik/colabo/src/services/puzzles/flow/go

python3 create_host_terra.py

Clients

cd /Users/mprinc/data/development/colabo-zontik/colabo/src/services/puzzles/flow/go

# sending a task request by python client
python3 create_client_terra.py

Messages

# delete all the messages in the `colabo.flow.host.node` queue
rabbitmqadmin purge queue name=colabo.flow.host.node

Heartbeat

# heartbeat for discovering python test host with a single task: `com.welcometerra.video.ffmpeg-multiple`
rabbitmqadmin publish exchange=amq.default routing_key=colabo.flow.host.heartbeat payload='{"id": "ColaboFlow-msg:371f4180-5c92-11ed-bc66-96ba02116486", "type": "HEARTBEAT", "requestId": "ColaboFlow-request:371f42f2-5c92-11ed-bc66-96ba02116486", "sender": "host-python-1", "replyTo": null, "proxies": [], "msgReplyChainIds": [], "msg": ["node host with tasks: ['com.welcometerra.video.ffmpeg-multiple']"], "extension": {"id": 2, "queueHost": "colabo.flow.host.python", "language": "PYTHON", "taskIds": ["com.welcometerra.video.ffmpeg-multiple"]}}'

Here is the full message:

{
	"id": "ColaboFlow-msg:371f4180-5c92-11ed-bc66-96ba02116486",
	"type": "HEARTBEAT",
	"requestId": "ColaboFlow-request:371f42f2-5c92-11ed-bc66-96ba02116486",
	"sender": "host-python-1",
	"replyTo": null,
	"proxies": [],
	"msgReplyChainIds": [],
	"msg": ["node host with tasks: ['com.welcometerra.video.ffmpeg - multiple']"
	],
	"extension": {
		"id": 2,
		"queueHost": "colabo.flow.host.python",
		"language": "PYTHON",
		"taskIds": ["com.welcometerra.video.ffmpeg-multiple"]
	}
}

process_video

{
	"userId": 16,
	"videoId": 49,
	"videoFileLocalPath": "/var/folders/f5/s2lwsbwx34728zbv9vd91f4w0000gn/T/tmpzz4ykin9.mp4",
	"first_name": "Sasha",
	"email": "mprinc@gmail.com",
	"username": "mprinc",
	"task_context": {
		"processId": 1,
		"userId": 16,
		"userName": "mprinc",
		"videoId": 49,
		"videoName": "ALWAYS BE SILENT IN FIVE SITUATIONS _ APJ Abdul Kalam Quotes _ Life Quotes - Quotation & Motivation.mp4",
		"name": "process_video",
		"id": 1
	},
	"videoToAudio": false
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

colabo_flow.s_go-0.3.5.tar.gz (21.1 kB view details)

Uploaded Source

File details

Details for the file colabo_flow.s_go-0.3.5.tar.gz.

File metadata

  • Download URL: colabo_flow.s_go-0.3.5.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.2

File hashes

Hashes for colabo_flow.s_go-0.3.5.tar.gz
Algorithm Hash digest
SHA256 382af88cd99f63427a3a7abac1eaca34fcbd2f371c6a5fabcab217581b6ae25b
MD5 8f7400edd553d2bff1d727528fbf9005
BLAKE2b-256 e192cad49b035d71d699b87defd538f38052f2463776dd9f6d5cca74e96420b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page