# smooch-bot-redis

> Redis state lock for smooch/smooch-bot

Latest version **1.0.0** (published 2016-04-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install smooch-bot-redis
pnpm add smooch-bot-redis
yarn add smooch-bot-redis
bun add smooch-bot-redis
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-04-23 |
| First published | 2016-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.2.2 |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Andrew Lavers |
| Maintainers | alavers |
| Keywords | smooch, bot |

## Links

- npm: https://www.npmjs.com/package/smooch-bot-redis
- Repository: https://github.com/smooch/smooch-bot-redis
- Homepage: https://github.com/smooch/smooch-bot-redis#readme
- Issues: https://github.com/smooch/smooch-bot-redis/issues
- npm.io page: https://npm.io/package/smooch-bot-redis

## Dependencies (1)

- [redis](https://npm.io/package/redis.md) ^2.6.0-1

## Recent versions

- 1.0.0 (latest) — 2016-04-23

## README

# Smooch Bot Redis[![Build Status](https://travis-ci.org/smooch/smooch-bot-redis.svg?branch=master)](https://travis-ci.org/smooch/smooch-bot-redis)

A state lock using redis, for use with [smooch-bot](https://github.com/smooch/smooch-bot)

```
var RedisLock = require('smooch-bot-redis').RedisLock;
var lock = new RedisLock();

lock.acquireLock('foo').then((acquired) => {
    if (acquired) {
        return lock.releaseLock('foo');
    }
});
```

## Options

  A Redis client is required.  An existing client can be passed directly using the `client` param or created for you using the `host`, `port`, or `socket` params.
  - `client` An existing client
  - `host` Redis server hostname
  - `port` Redis server portno
  - `socket` Redis server unix_socket
  - `url` Redis server url
  - `pass` Password for Redis authentication

For example:

```
var RedisLock = require('smooch-bot-redis').RedisLock;
var lock = new RedisLock({
    host: 'localhost',
    port: 6379,
});
```

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