1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

380 Commits

Author SHA1 Message Date
Ruben Bridgewater
c846ed71d1 Merge pull request #826 from fintura/multi
Fix multi error handling
2015-09-18 00:38:05 +02:00
Ruben Bridgewater
4d1390318c Merge pull request #853 from fintura/eval
Remove bad .eval implementation
2015-09-18 00:17:35 +02:00
Ruben Bridgewater
d61d97e24e Fix .auth not working properly
The arguments parameter was faulty andthe callback could have been triggered twice
2015-09-18 00:05:10 +02:00
Ruben Bridgewater
8b7d4a8449 Remove bad .eval implementation
The implementation is not really good as mentioned in #722 and we pipline our commands.
That way we can't just replace the eval function as it was. This could result in violating the order of execution!

If we want to include a function like this we should not break the order of execution and also not recalculate the sha1 hash each time.
2015-09-17 22:51:42 +02:00
Ruben Bridgewater
21d8bdbbcb Refactor multi to have a consistent error handling
Ignore *.log files
2015-09-17 20:30:11 +02:00
Ruben Bridgewater
9e2c665d5c Refactor exec 2015-09-16 06:34:36 +02:00
Ruben Bridgewater
f92f4d0df9 Merge pull request #850 from fintura/fix-late-commands
Fix commands not being rejected after calling .quit

Fixes #791
2015-09-16 05:43:55 +02:00
Ruben Bridgewater
bfcc0ae263 Merge pull request #843 from fintura/reduce-timeout
Reduce the reauthenticate timeout to 333ms
2015-09-16 05:43:07 +02:00
Ruben Bridgewater
a0c906256c Fix commands not being rejected after calling .quit as reported in #791 2015-09-16 05:29:34 +02:00
Ruben Bridgewater
89c8dd056b Do not emit the broken mode twice if exec is called
Add more tests
2015-09-16 05:22:43 +02:00
Ruben Bridgewater
30ec1cd6a2 shift in the while loop 2015-09-16 05:22:42 +02:00
Ruben Bridgewater
55d0036eae Add test and fix keeping the offline queue
Use a new delay after reconnecting
2015-09-16 05:22:07 +02:00
Ruben Bridgewater
3c2ba8c373 Try exactly until the connection timeout has been reached
Fixes #587
2015-09-16 05:22:07 +02:00
Chris Hamant
a9e7663aff removing flush_and_error from on_error handler 2015-09-16 05:22:07 +02:00
Ruben Bridgewater
1e0421ac3b Emit errors if the connection timeout / maximum retry attempts have been exceeded
Accept setting max_attempts to zero.
The reconnection event is now emitted when trying to reconnect instead of earlier.
The connection timeout is now going to trigger once after exceeding the maximum timeout instead of stopping earlier.
2015-09-16 05:22:07 +02:00
Ruben Bridgewater
f2ee8dbc9e Add a connection timeout of 24h as new default for maximum reconnecting 2015-09-16 05:22:07 +02:00
Ruben Bridgewater
04c986a4cd Lowering the first retry_delay and begin from that value
Earlier the first value was never used, as it was first multiplied by 1.7
2015-09-16 05:22:07 +02:00
Ruben Bridgewater
cd5cfb4a8e Emit an error when connection permanently goes down
Closes #724 and #615
2015-09-16 05:22:07 +02:00
Ruben Bridgewater
403bfb0200 Merge pull request #835 from fintura/remove-stuff
Remove send_command safety checks. Fixes #629
2015-09-16 05:21:18 +02:00
Ruben Bridgewater
eea9d2af76 Merge pull request #847 from fintura/check-password
Check that the password is from type string
2015-09-16 05:20:43 +02:00
Ruben Bridgewater
005e869d83 Remove send_command safety checks
This checks are only important for users who use send_command directly instead of using the convience method.
As the readme clearly stats how send_command should work and any user would have run into errors if misused, these checks can be removed. If any user might misuse the function anyway, it is very likely that another error will be thrown because of that

Fix #629 and insert tests
2015-09-16 05:10:39 +02:00
Ruben Bridgewater
c269b7539c Check that the password is from type string 2015-09-15 22:35:25 +02:00
Ruben Bridgewater
c522ca1264 Fix inconsistent command argument handling
Earlier multi.command and client.command diverged a lot in the way they accepted arguments. This is now consistent
This will also fix some bugs like using multi.hmset with arrays
2015-09-15 04:00:02 +02:00
Ruben Bridgewater
ebbb0146b9 Fix auth emitting the error even though a callback is present
Fix auth manipulating the returned error
And this is also removing some dead code
2015-09-15 03:50:47 +02:00
Ruben Bridgewater
1a06cfb6ec Add .command_used to errors thrown by the parser 2015-09-15 03:50:46 +02:00
Ruben Bridgewater
6ea70271d6 v8 is going to inline a couple of things that were necessary a few years ago 2015-09-15 03:39:33 +02:00
Ruben Bridgewater
785af29385 Merge pull request #842 from fintura/speedup
Small speedup: do not call data.toString() on debug messages
2015-09-14 23:13:19 +02:00
Ruben Bridgewater
4a8da6dce5 Merge pull request #823 from fintura/debug
Refactor debug mode not to break old code and to work with NODE_DEBUG too
2015-09-14 23:12:50 +02:00
Ruben Bridgewater
4f0443cdd4 Emit errors instead of throwing them
Thrown errors might kill the users app. By emitting the errors the user is able to catch all errors in one place without the app going down
2015-09-14 21:28:40 +02:00
Ruben Bridgewater
c6ae7832a3 Remove try callbacks and emit an error in case of no callback has been provided 2015-09-14 21:28:40 +02:00
Ruben Bridgewater
656706a263 Reduce the reauthenticate timeout to 333ms
It should not take all that long to load everything into redis
2015-09-14 15:46:17 +02:00
Ruben Bridgewater
e6aa3826f7 Small speedup: do not call data.toString() on debug messages 2015-09-13 23:51:36 +02:00
Ruben Bridgewater
0925885a88 Do not wrap errors into other errors. The trace is going to be manipulated that way. 2015-09-12 21:59:17 +02:00
Ruben Bridgewater
b06985a219 Update commands list and remove unecessary code
Add use strict

Add changelog entry
2015-09-12 19:47:25 +02:00
Ruben Bridgewater
1c1c4ea446 Update readme about lower case commands 2015-09-12 19:17:02 +02:00
Ruben Bridgewater
4c6b84315e Tiny speedup by removing command.toLowerCase()
This is not necessary as the command itself is only used from inside the code and as they are (now) all lower case it is safe to remove the toLowerCase
2015-09-12 19:17:02 +02:00
Ruben Bridgewater
b63e980913 Merge pull request #825 from fintura/emitter
Remove event emitters from the parsers
2015-09-12 19:15:38 +02:00
Ruben Bridgewater
ba779ac361 Some small code style changes
Revert some done stuff
2015-09-12 18:56:49 +02:00
Ruben Bridgewater
06c5f1922b Add jshint and fix errors accordingly (including broken tests) 2015-09-12 18:56:49 +02:00
Benjamin E. Coe
a31a4e29e9 Merge pull request #819 from NodeRedis/815-tweaks
minor tweaks to how we spawn tests in #815
2015-09-11 21:40:48 -07:00
Ruben Bridgewater
0170145f74 Remove event emitters from the parser as they are overhead that is not needed 2015-09-05 17:10:27 +02:00
Ruben Bridgewater
159bc80653 Revert to old behavior 2015-09-04 15:37:47 +02:00
Ruben Bridgewater
9b1d262cdf Accept hmset being used without a callback. Closes #694 2015-09-04 15:21:59 +02:00
Ruben Bridgewater
03e696b476 Merge pull request #761 from vitaliylag/patch-1
Callback should be optional when using Array args. Closes #321 #502 #694 #398
2015-09-04 12:26:02 +02:00
Ruben Bridgewater
89e1f6f067 Improve code coverage by adding tests and removing unnecessary code 2015-09-03 22:26:01 +02:00
Ruben Bridgewater
62041c519f Test for statements instead of matching them if test is enough
precompile regex
2015-09-02 22:13:07 +02:00
Ruben Bridgewater
19db6d1dad Remove lib/util.js 2015-09-02 22:13:07 +02:00
Ruben Bridgewater
52db91c753 Fix js parser sending non-Errors 2015-09-02 22:13:07 +02:00
Ruben Bridgewater
e0d0649c60 Add fallback for node 0.10
Improve the fallback mode
2015-09-02 21:52:54 +02:00
Ruben Bridgewater
1eb30add66 Use util.debuglog instead of using different indidivudal styles for debugging 2015-09-02 21:49:11 +02:00