Skip to content

Commit

Permalink
πŸ“˜ DOCS: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoCelmer committed May 16, 2023
1 parent b104857 commit 828ff1d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

```python
pip install upy-rabbitmq

```

## Config
Expand All @@ -29,6 +28,7 @@ RABBITMQ_URL=amqp://user:[email protected]:port//vhost
```

## Callback Class
> callback.py
```python

Expand All @@ -43,6 +43,7 @@ class MyCallBack(CallbackProcess):
```

## Start Queue
> worker.py
```python

Expand All @@ -56,6 +57,7 @@ worker.start_queue(
```

## New Task
> client.py
```python
from upy_rabbitmq.client import UpyMQClient
Expand Down
22 changes: 20 additions & 2 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 Down Expand Up @@ -27,19 +27,37 @@ Add an environment variation called **RABBITMQ_URL** in your project's .env file
RABBITMQ_URL=amqp://user:[email protected]:port//vhost
```

## Callback Class
> callback.py
```python

import time
from upy_rabbitmq.callback import CallbackProcess

class MyCallBack(CallbackProcess):

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

## Start Queue
> worker.py
```python

from upy_rabbitmq.worker import UpyMQWorker

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

## New Task
> client.py
```python
from upy_rabbitmq.client import UpyMQClient
Expand Down

0 comments on commit 828ff1d

Please sign in to comment.