Skip to content

Commit

Permalink
Merge pull request #2 from tedivm/doc_cleanup
Browse files Browse the repository at this point in the history
Clean up README.md
  • Loading branch information
tedivm authored Sep 15, 2023
2 parents 7ef6aa8 + 76afc6f commit 73b6bf9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ from quasiqueue import QuasiQueue
async def writer(desired_items: int):
"""Feeds data to the Queue when it is low.
"""
return xrange(0, desired_items)
return range(0, desired_items)


async def reader(identifier: int|str):
Expand Down Expand Up @@ -147,13 +147,13 @@ The reader can be asynchronous or synchronous. Since each reader runs in its own

The write function is called whenever the Queue is low. It has to return an iterator of items that can be pickles (strings, integers, or sockets are common examples) that will be feed to the Reader. Generators are a great option to reduce memory usage, but even simple lists can be returned. The writer function has to be asynchronous.

The writer function only has one argument- the desired number of items that QuasiQueue would like to retrieve and add to the Queue. This number is meant to allow for optimization on behalf of the developers- it can be completely ignored, but QuasiQueue will run more efficiently if you keep it as close the desired_items as possible.
The writer function only has one argument- the desired number of items that QuasiQueue would like to retrieve and add to the Queue. This number is meant to allow for optimization on behalf of the developers- it can be completely ignored, but QuasiQueue will run more efficiently if you keep it as close the `desired_items` as possible.

```python
async def writer(desired_items: int):
"""Feeds data to the Queue when it is low.
"""
return xrange(0, desired_items)
return range(0, desired_items)

```

Expand Down Expand Up @@ -208,7 +208,7 @@ QuasiQueue has a variety of optimization settings that can be tweaked depending
|`graceful_shutdown_timeout`|integer| The time in seconds that QuasiQueue will wait for readers to finish when it is asked to gracefully shutdown. | 30 |
| `lookup_block_size` |integer|The default desired_items passed to the writer function. This will be adjusted lower depending on queue dynamics.| 10 |
| `max_jobs_per_process` |integer| The number of jobs a reader process will run before it is replaced by a new process. | 200 |
| `max_queue_size` |integer| The max allowed six of the queue. | 300 |
| `max_queue_size` |integer| The max allowed size of the queue. | 300 |
| `num_processes` |integer| The number of reader processes to run. | 2 |
| `prevent_requeuing_time` |integer| The time in seconds that an item will be prevented from being readded to the queue. | 300 |
|`queue_interaction_timeout`| float| The time QuasiQueue will wait for the Queue to be unlocked before throwing an error. | 0.01 |
Expand Down

0 comments on commit 73b6bf9

Please sign in to comment.