haraka-plugin-redis
Advanced tools
Comparing version 2.0.5 to 2.0.6
### Unreleased | ||
### [2.0.6] - 2023-12-12 | ||
- doc(README): '[socket]' is now '[server]' (#39) | ||
- chore(ci): add .release, updated dot files | ||
### 2.0.5 - 2022-05-26 | ||
@@ -86,1 +94,2 @@ | ||
[2.0.6]: https://github.com/haraka/haraka-plugin-redis/releases/tag/2.0.6 |
12
index.js
@@ -153,2 +153,3 @@ 'use strict'; | ||
this.redis_pings=true | ||
return true | ||
@@ -197,2 +198,3 @@ } | ||
exports.get_redis_pub_channel = function (conn) { | ||
@@ -206,3 +208,4 @@ return `result-${conn.transaction ? conn.transaction.uuid : conn.uuid}`; | ||
exports.redis_subscribe_pattern = async function (pattern) { | ||
// formerly used by pi-watch | ||
exports.redis_subscribe_pattern = async function (pattern, onMessage) { | ||
@@ -214,7 +217,8 @@ if (this.redis) return // already subscribed? | ||
await this.redis.pSubscribe(pattern); | ||
await this.redis.pSubscribe(pattern, onMessage); | ||
this.logdebug(this, `pSubscribed to ${pattern}`); | ||
} | ||
exports.redis_subscribe = async function (connection) { | ||
// the next two functions are use by pi-karma | ||
exports.redis_subscribe = async function (connection, onMessage) { | ||
@@ -236,3 +240,3 @@ if (connection.notes.redis) { | ||
const pattern = this.get_redis_sub_channel(connection) | ||
connection.notes.redis.pSubscribe(pattern); | ||
connection.notes.redis.pSubscribe(pattern, onMessage); | ||
connection.logdebug(this, `pSubscribed to ${pattern}`); | ||
@@ -239,0 +243,0 @@ } |
{ | ||
"name": "haraka-plugin-redis", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "Redis plugin for Haraka & other plugins to inherit from", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -12,3 +12,3 @@ # haraka-plugin-redis | ||
### [socket] | ||
### [server] | ||
@@ -15,0 +15,0 @@ ```ini |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18920
314