- 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.