Skip to content

Commit 1a73dc2

Browse files
committed
Support of node 0.8
1 parent eb1c363 commit 1a73dc2

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ language: node_js
22
node_js:
33
- "0.11"
44
- "0.10"
5+
- "0.8"
56
services:
67
- redis-server

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# dtimer
2-
3-
Distributed timer backed by Redis.
4-
5-
[![NPM](https://nodei.co/npm/dtimer.png)](https://nodei.co/npm/dtimer/)
2+
[![NPM](https://nodei.co/npm/dtimer.png?compact=true)](https://nodei.co/npm/dtimer/)
63

74
[![unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)](http://nodejs.org/api/documentation.html#documentation_stability_index)
85
[![Build Status](https://travis-ci.org/enobufs/dtimer.svg?branch=master)](https://travis-ci.org/enobufs/dtimer)
96

7+
Distributed timer backed by Redis.
8+
109
## Why dtimer?
1110
In a clustered server environment, you'd occasionally need to process a task after a certain period of time. The setTimeout() may not be suitable because the process may die for whatever reason, the timed events would also be lost. Ideally, you'd want to store these timed events on a central strage, then have a cluster of listeners handle the due events. If you are already using Redis, then this dtimer would be a handy solution for you.
1211

@@ -71,4 +70,4 @@ dt.post({msg:'hello'}, 200, function (err) {
7170
// failed to post event
7271
return; }
7372
// posted event successfully})
74-
```
73+
```

lib/dtimer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var defaults = {
1515
// scripts
1616
var scripts = {
1717
update: {
18-
script: fs.readFileSync(__dirname + '/update.lua', {encoding:'utf8'})
18+
script: fs.readFileSync(__dirname + '/update.lua', 'utf8')
1919
}
2020
};
2121

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dtimer",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Distributed timer backed by Redis.",
55
"main": "index.js",
66
"scripts": {
@@ -11,14 +11,14 @@
1111
"url": "git://github.com/enobufs/dtimer.git"
1212
},
1313
"dependencies": {
14-
"underscore": "^1.6.0",
15-
"redis": "^0.11.0",
16-
"async": "^0.9.0",
17-
"lured": "^0.0.1",
14+
"underscore": "~1.6.0",
15+
"redis": "~0.12.1",
16+
"lured": "~0.0.2",
1817
"debug": "~1.0.4"
1918
},
2019
"devDependencies": {
21-
"mocha": "^1.21.0"
20+
"async": "~0.9.0",
21+
"mocha": "~1.21.0"
2222
},
2323
"keywords": [
2424
"timer",

0 commit comments

Comments
 (0)