Skip to content

Commit

Permalink
πŸ“˜ DOCS: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoCelmer committed Aug 7, 2023
1 parent 04fba9f commit ee3b6b8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

---

- **Documentation**: [https://github.com/UpyExplorer/upy-rabbitmq](https://github.com/UpyExplorer/upy-rabbitmq)
- **Documentation**: [https://upyexplorer.github.io/upy-rabbitmq/](https://upyexplorer.github.io/upy-rabbitmq/)
- **Source Code**: [https://github.com/UpyExplorer/upy-rabbitmq](https://github.com/UpyExplorer/upy-rabbitmq)

---
Expand Down
28 changes: 23 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Upy-RabbitMQ
# upy-rabbitmq

![GitHub Org's stars](https://img.shields.io/github/stars/UpyExplorer?label=LinuxProfile&style=flat-square)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/upy-rabbitmq)
Expand All @@ -8,7 +8,7 @@

---

- **Documentation**: [https://github.com/UpyExplorer/upy-rabbitmq](https://github.com/UpyExplorer/upy-rabbitmq)
- **Documentation**: [https://upyexplorer.github.io/upy-rabbitmq/](https://upyexplorer.github.io/upy-rabbitmq/)
- **Source Code**: [https://github.com/UpyExplorer/upy-rabbitmq](https://github.com/UpyExplorer/upy-rabbitmq)

---
Expand All @@ -17,6 +17,7 @@

```python
pip install upy-rabbitmq

```

## Config
Expand All @@ -27,19 +28,36 @@ Add an environment variation called **RABBITMQ_URL** in your project's .env file
RABBITMQ_URL=amqp://user:[email protected]:port//vhost
```

## Start Queue
## Implementation

### Callback Class

```python

import time
from upy_rabbitmq.callback import CallbackProcess

class MyCallBack(CallbackProcess):

def process(self):
time.sleep(5)
print(self.body.decode())
```

### Start Queue

```python

from upy_rabbitmq.worker import UpyMQWorker

worker = UpyMQWorker()
worker.start_queue(
key="key",
callback=callback
callback=MyCallBack
)
```

## New Task
### New Task

```python
from upy_rabbitmq.client import UpyMQClient
Expand Down

0 comments on commit ee3b6b8

Please sign in to comment.