You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
feat(parser): update to latest Redis parser & errors (#1470)
* Update redis errors and redis parser * Fix lint errors * Add node 12 to travis ci * Add appveyor node 12 * Fix some of existing errors This drops support for hiredis.
This commit is contained in:
committed by
GitHub
parent
1f082aca54
commit
78936ac50c
@@ -5,43 +5,43 @@ var client1 = redis.createClient();
|
||||
var client2 = redis.createClient();
|
||||
var client3 = redis.createClient();
|
||||
|
||||
client1.xadd('mystream', '*', 'field1', 'm1', function (err) {
|
||||
if(err){
|
||||
return console.error(err);
|
||||
}
|
||||
client1.xgroup('CREATE', 'mystream', 'mygroup', '$', function (err) {
|
||||
if(err){
|
||||
return console.error(err);
|
||||
}
|
||||
});
|
||||
|
||||
client2.xreadgroup('GROUP', 'mygroup', 'consumer', 'Block', 1000, 'NOACK',
|
||||
'STREAMS', 'mystream', '>', function (err, stream) {
|
||||
if(err){
|
||||
return console.error(err);
|
||||
}
|
||||
console.log('client2 ' + stream);
|
||||
});
|
||||
|
||||
client3.xreadgroup('GROUP', 'mygroup', 'consumer', 'Block', 1000, 'NOACK',
|
||||
'STREAMS', 'mystream', '>', function (err, stream) {
|
||||
if(err){
|
||||
return console.error(err);
|
||||
}
|
||||
console.log('client3 ' + stream);
|
||||
});
|
||||
client1.xadd('mystream', '*', 'field1', 'm1', function (err) {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
client1.xgroup('CREATE', 'mystream', 'mygroup', '$', function (err) {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
client1.xadd('mystream', '*', 'field1', 'm2', function (err) {
|
||||
if(err){
|
||||
return console.error(err);
|
||||
}
|
||||
});
|
||||
|
||||
client1.xadd('mystream', '*', 'field1', 'm3', function (err) {
|
||||
if(err){
|
||||
return console.error(err);
|
||||
}
|
||||
});
|
||||
client2.xreadgroup('GROUP', 'mygroup', 'consumer', 'Block', 1000, 'NOACK',
|
||||
'STREAMS', 'mystream', '>', function (err, stream) {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
console.log('client2 ' + stream);
|
||||
});
|
||||
|
||||
client3.xreadgroup('GROUP', 'mygroup', 'consumer', 'Block', 1000, 'NOACK',
|
||||
'STREAMS', 'mystream', '>', function (err, stream) {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
console.log('client3 ' + stream);
|
||||
});
|
||||
|
||||
|
||||
client1.xadd('mystream', '*', 'field1', 'm2', function (err) {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
});
|
||||
|
||||
client1.xadd('mystream', '*', 'field1', 'm3', function (err) {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user