Commit Graph

15 Commits

Author SHA1 Message Date
barisusakli
d1a1cada19 fix typo 2015-01-29 17:12:12 -05:00
barisusakli
530bdbbd1a dont rename if key doesn't exist 2015-01-29 17:10:49 -05:00
barisusakli
f67053df52 figure out pathname, dont crash if callback isnt supplied 2015-01-17 15:06:12 -05:00
barisusakli
1cbf5ddfe9 only send back err on redis.deleteAll 2014-12-25 03:14:04 -05:00
barisusakli
7cf3719c80 fix rename and increment 2014-12-25 03:08:49 -05:00
barisusakli
bf54859a27 key tests 2014-12-25 01:53:28 -05:00
barisusakli
1d2d69fa45 use helpers, redis crash fix 2014-11-15 23:44:34 -05:00
barisusakli
0a44d3f5e0 moved updateCategoryField out, db.delete only sends back err 2014-11-15 22:41:45 -05:00
barisusakli
2252ab7479 notifications.prune
run every hour
dont get more than 500 notifications
2014-09-07 03:17:51 -04:00
barisusakli
e6d8e9c959 searchIndex callbacks 2014-06-24 09:15:44 -04:00
Charles
90b2d766f7 Fix callback execution in redis search
`callback` should be passed to `reds.search` otherwise the execution will be overlapped. 

For example in the plugin `nodebb-plugin-dbsearch':

```javascript
db.searchRemove('topic', tid, function() {
	if (typeof title === 'string' && title.length) {
		db.searchIndex('topic', title, tid);
	}

	if (typeof callback === 'function') {
		callback();
	}
});
```

The actual execution is like this

```
1402387863.625553 [0 127.0.0.1:16660] "zrevrangebyscore" "nodebbtopicsearch:object:6" "+inf" "0"
1402387863.625891 [0 127.0.0.1:16660] "MULTI"
1402387863.626043 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:123" "1" "6"
1402387863.626052 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "123"
1402387863.626060 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:TST" "1" "6"
1402387863.626065 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "TST"
1402387863.626071 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:AN0" "1" "6"
1402387863.626076 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "AN0"
1402387863.626083 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:TPK" "1" "6"
1402387863.626092 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "TPK"
1402387863.626104 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:word:ETTT" "1" "6"
1402387863.626116 [0 127.0.0.1:16660] "zadd" "nodebbtopicsearch:object:6" "1" "ETTT"
1402387863.626130 [0 127.0.0.1:16660] "EXEC"
1402387863.626253 [0 127.0.0.1:16660] "del" "topic:6:tags"
1402387863.626281 [0 127.0.0.1:16660] "MULTI"
1402387863.626515 [0 127.0.0.1:16660] "del" "nodebbtopicsearch:object:6"
1402387863.626524 [0 127.0.0.1:16660] "EXEC"
```

The key nodebbtopicsearch:object is added and then just being deleted again.
2014-06-10 15:30:53 +07:00
Julian Lam
e64c1bfec3 closed #1453 2014-05-11 11:45:20 -04:00
Julian Lam
bab140c396 added pexpire and pexpireAt methods for redis and mongo. Added emoticons for leveldb (as per existing implementation by @psychobunny LOL) 2014-05-11 10:31:32 -04:00
psychobunny
bba3df6802 moving db.close into the parent module 2014-04-14 13:51:45 -04:00
psychobunny
9ad7ce9ca8 organizing redis driver 2014-04-11 15:29:01 -04:00