- Documentation: https://github.com/UpyExplorer/upy-rabbitmq
- Source Code: https://github.com/UpyExplorer/upy-rabbitmq
pip install upy-rabbitmq
Add an environment variation called RABBITMQ_URL in your project's .env file.
RABBITMQ_URL=amqp://user:password@remote.server.com:port//vhost
callback.py
import time
from upy_rabbitmq.callback import CallbackProcess
class MyCallBack(CallbackProcess):
def process(self):
time.sleep(5)
print(self.body.decode())
worker.py
from upy_rabbitmq.worker import UpyMQWorker
worker = UpyMQWorker()
worker.start_queue(
key="key",
callback=MyCallBack
)
client.py
from upy_rabbitmq.client import UpyMQClient
client = UpyMQClient()
client.new_task(
key="key",
message="Hello"
)
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- βοΈ FEATURE
- π PEP8
- π ISSUE
- πͺ² BUG
- π DOCS
- π¦ PyPI
- β€οΈοΈ TEST
- β¬οΈ CI/CD
β οΈ SECURITY
Distributed under the MIT License. See LICENSE
for more information.