# @walletswise/resq

> This library is using [actionhero/node-resque: Node.js Background jobs backed by redis. (github.com)](https://github.com/actionhero/node-resque) package and is used to have more control over the cron jobs across all microservices

Latest version **1.0.1** (published 2022-11-22) · 0 weekly downloads

## Install

```sh
npm install @walletswise/resq
pnpm add @walletswise/resq
yarn add @walletswise/resq
bun add @walletswise/resq
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-11-22 |
| First published | 2022-11-20 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 81.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | wallets-wise |

## Links

- npm: https://www.npmjs.com/package/@walletswise/resq
- npm.io page: https://npm.io/package/@walletswise/resq

## Dependencies (5)

- [ioredis](https://npm.io/package/ioredis.md) ^5.2.3
- [node-resque](https://npm.io/package/node-resque.md) ^9.2.1
- [node-schedule](https://npm.io/package/node-schedule.md) ^2.1.0
- [@nestjs/common](https://npm.io/package/@nestjs/common.md) ^8.0.0
- [cron-expression-validator](https://npm.io/package/cron-expression-validator.md) ^1.0.20

## Recent versions

- 1.0.1 (latest) — 2022-11-22
- 1.0.0 — 2022-11-20

## README

# NDAX-RESQUE Library

This library is using [actionhero/node-resque: Node.js Background jobs backed by redis. (github.com)](https://github.com/actionhero/node-resque) package and is used to have more control over the cron jobs across all microservices

# Setup

**First** you need to extend the abstrac class and pass the redisconfig, service name, and cron time in super

**Second** you need to overwrite the execute method with what ever method you want to run

**Finally** You must handle queues, worker, and scheduler upon module init and destroy.


    async  onModuleDestroy(): Promise<void> {
        await  this.end();
        }
      
    async  onModuleInit(): Promise<void> {
        await  this.start();
        }
    
See below for full example:
![full example](./readme-assets/example.png)
## Key Features

The main reason for using this library is we can monitor the status or cron , as this library will put events of the worker, queue, and scheduler  in redis. And in future its possible to add functionality that allows us to have even more control over these queues, worker, scheduler

---
_Source: https://npm.io/package/@walletswise/resq · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
