Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed Jan 25, 2024
1 parent ce1c058 commit 9cd59f9
Showing 1 changed file with 68 additions and 17 deletions.
85 changes: 68 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 align="center">hyper-adapter-queue</h1>
<h1 align="center">hyper-adapter-bullmq</h1>
<p align="center">A Queue port adapter for BullMQ in the <a href="https://hyper.io/">hyper</a> service framework</p>
</p>
<p align="center">
Expand All @@ -11,50 +11,101 @@
<!-- toc -->

- [Getting Started](#getting-started)
- [Installation](#installation)
- [Methods](#methods)
- [Contributing](#contributing)
- [Testing](#testing)
- [License](#license)

<!-- tocstop -->

## Getting Started

TODO

## Installation
```ts
import { default as bullmq } from 'https://raw.githubusercontent.com/hyper63/hyper-adapter-bullmq/v1.0.1/mod.ts'

export default {
app,
adapter: [
{
port: 'queue',
plugins: [
bullmq({
url: 'http://user@[email protected]:6379',
}),
],
},
],
}
```

TODO
You can pass the following configuration to the adapter:

```ts
export type AdapterConfig = {
/**
* The redis server connection string
*/
url: string
options?: {
/**
* How many Workers to spawn in order to process jobs.
*
* Defaults to 10
*/
concurrency?: number
/**
* The Time-To-Live for jobs whose processing fails. The job payload,
* along with the error is stored in redis.
*
* Defaults to 7 days.
*/
failedTtl?: number
/**
* A prefix you'd like all keys created by the adapter to use.
*
* Defaults to no prefix ie. ''
*/
keyPrefix?: string
/**
* Whether the Redis Server being used is clustered.
*
* Defaults to false
*/
cluster?: boolean
}
}
```
## Methods
This adapter fully implements the Queue port and can be used as the
[hyper Queue service](https://docs.hyper.io/queue-api) adapter

See the full port [here](https://nest.land/package/hyper-port-queue)
[hyper Queue service](https://hyper63.github.io/docs/docs/api-reference/rest/queue.html) adapter
## Contributing

Contributions are welcome! See the hyper
[contribution guide](https://docs.hyper.io/oss/contributing-to-hyper)
See the full port [here](https://github.com/hyper63/hyper/tree/main/packages/port-queue)
## Testing
Run Tests
```
```sh
deno task test
```
To lint, check formatting, and run unit tests
Run Integration Tests
> You will need a Redis Server running and `REDIS_URL` set to your Redis server connection string
```sh
deno task test:integration
```
Run Test Harness
```sh
deno task test:harness
```
To lint, check formatting, and run unit tests

## License
Apache-2.0

0 comments on commit 9cd59f9

Please sign in to comment.