haraka-plugin-redis
Advanced tools
Comparing version 2.0.0 to 2.0.1
### 2.0.1 - 2022-05-23 | ||
- fix: rename p* methods -> * (required in redis v4) | ||
- dep(redis): bump 4.0 -> 4.1 | ||
### 2.0.0 - 2022-03-29 | ||
@@ -4,0 +10,0 @@ |
14
index.js
@@ -198,7 +198,7 @@ 'use strict'; | ||
await this.redis.psubscribe(pattern); | ||
this.logdebug(this, `psubscribed to ${pattern}`); | ||
await this.redis.subscribe(pattern); | ||
this.logdebug(this, `subscribed to ${pattern}`); | ||
} | ||
exports.redis_subscribe = async function (connection) { | ||
exports.redis_subscribe = async function (connection, event) { | ||
@@ -211,3 +211,3 @@ if (connection.notes.redis) { | ||
const timer = setTimeout(() => { | ||
connection.logerror('redis psubscribe timed out'); | ||
connection.logerror('redis subscribe timed out'); | ||
}, 3 * 1000); | ||
@@ -220,4 +220,4 @@ | ||
const pattern = this.get_redis_sub_channel(connection) | ||
connection.notes.redis.psubscribe(pattern); | ||
connection.logdebug(this, `psubscribed to ${pattern}`); | ||
connection.notes.redis.subscribe(pattern, event); | ||
connection.logdebug(this, `subscribed to ${pattern}`); | ||
} | ||
@@ -233,5 +233,5 @@ | ||
const pattern = this.get_redis_sub_channel(connection) | ||
await connection.notes.redis.punsubscribe(pattern); | ||
await connection.notes.redis.unsubscribe(pattern); | ||
connection.logdebug(this, `unsubsubscribed from ${pattern}`); | ||
connection.notes.redis.disconnect(); | ||
} |
{ | ||
"name": "haraka-plugin-redis", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Redis plugin for Haraka & other plugins to inherit from", | ||
@@ -10,3 +10,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"redis": "^4.0.0" | ||
"redis": "^4.1.0" | ||
}, | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
@@ -6,5 +6,3 @@ # haraka-plugin-redis | ||
Connects to a redis instance. By default it stores a `redis` | ||
connection handle at `server.notes.redis`. See below to get a custom DB handle | ||
attached to another database. | ||
Connects to a redis instance. By default it stores a `redis` connection handle at `server.notes.redis`. See below to get a custom DB handle attached to another database. | ||
@@ -11,0 +9,0 @@ ## Config |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
16771
1
105
Updatedredis@^4.1.0