Skip to content

Commit

Permalink
Merge pull request #5 from haraka/3-eslint4-compat
Browse files Browse the repository at this point in the history
update for compat with eslint 4
  • Loading branch information
msimerson authored Jun 17, 2017
2 parents c7e18b4 + e6e59b4 commit e46eb5b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 17 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
],
"extends": ["eslint:recommended", "plugin:haraka/recommended"],
"rules": {
"no-console": 0
}
}
4 changes: 4 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

# 1.0.6 - 2017-06-16

- eslint 4 compat

# 1.0.5 - 2017-06-09

- disconnect per-connection redis client upon punsubscribe
Expand Down
30 changes: 15 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ exports.redis_subscribe_pattern = function (pattern, next) {
host: plugin.redisCfg.pubsub.host,
port: plugin.redisCfg.pubsub.port,
})
.on('psubscribe', function (pattern2, count) {
plugin.logdebug(plugin, 'psubscribed to ' + pattern2);
next();
})
.on('punsubscribe', function (pattern3, count) {
plugin.logdebug(plugin, 'unsubsubscribed from ' + pattern3);
});
.on('psubscribe', function (pattern2, count) {
plugin.logdebug(plugin, 'psubscribed to ' + pattern2);
next();
})
.on('punsubscribe', function (pattern3, count) {
plugin.logdebug(plugin, 'unsubsubscribed from ' + pattern3);
});
plugin.redis.psubscribe(pattern);
};

Expand All @@ -210,14 +210,14 @@ exports.redis_subscribe = function (connection, next) {
host: plugin.redisCfg.pubsub.host,
port: plugin.redisCfg.pubsub.port,
})
.on('psubscribe', function (pattern, count) {
connection.logdebug(plugin, 'psubscribed to ' + pattern);
next();
})
.on('punsubscribe', function (pattern, count) {
connection.logdebug(plugin, 'unsubsubscribed from ' + pattern);
connection.notes.redis.quit();
});
.on('psubscribe', function (pattern, count) {
connection.logdebug(plugin, 'psubscribed to ' + pattern);
next();
})
.on('punsubscribe', function (pattern, count) {
connection.logdebug(plugin, 'unsubsubscribed from ' + pattern);
connection.notes.redis.quit();
});
connection.notes.redis.psubscribe(plugin.get_redis_sub_channel(connection));
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haraka-plugin-redis",
"version": "1.0.5",
"version": "1.0.6",
"description": "Redis plugin for Haraka & other plugins to inherit from",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit e46eb5b

Please sign in to comment.