Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

JSDoc changes

  • Loading branch information...
commit 93cae9808a014f9f6b8123a5a0a19fa9745d87f1 1 parent 2b6800f
Tim authored January 24, 2011

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. 14  index.js
14  index.js
... ...
@@ -1,8 +1,12 @@
  1
+/**
  2
+ * Requires.
  3
+ */
1 4
 var redis  = require('./deps/node-redis'),
2 5
     events = require('events');
3 6
 
4 7
 /**
5 8
  * Handle an error appropiatly.
  9
+ *
6 10
  * @param {Error} error The error object in question.
7 11
  * @param {Function} callback Optional callback to pass error to.
8 12
  */
@@ -15,6 +19,7 @@ var handleError = function (error, callback) {
15 19
 
16 20
 /**
17 21
  * Remove a prefix from a string.
  22
+ *
18 23
  * @param {String} prefix The prefix.
19 24
  * @param {String} string The string.
20 25
  * @returns {string} The un-prefixed string.
@@ -25,6 +30,7 @@ var removePrefix = function (prefix, string) {
25 30
 
26 31
 /**
27 32
  * The Queue prototype used by the server to add jobs to a queue.
  33
+ *
28 34
  * @constructor
29 35
  * @param {String} name The queue name.
30 36
  * @param {String} host The host name for the Redis client.
@@ -38,6 +44,7 @@ var Queue = function (name, host, port) {
38 44
 
39 45
 /**
40 46
  * Creates a new Queue object.
  47
+ *
41 48
  * @param {String} name The queue name.
42 49
  * @param {String} host The host name for the Redis client.
43 50
  * @param {Number} port The port number for the Redis client.
@@ -51,6 +58,7 @@ exports.Queue = Queue;
51 58
 
52 59
 /**
53 60
  * Adds a new job to the queue.
  61
+ *
54 62
  * @param The data payload to enqueue.
55 63
  */
56 64
 Queue.prototype.push = function (payload, callback) {
@@ -82,6 +90,7 @@ Queue.prototype.push = function (payload, callback) {
82 90
 /**
83 91
  * Worker prototype used by the workers to listen for jobs.
84 92
  * Inherits from EventEmitter.
  93
+ *
85 94
  * @constructor
86 95
  */
87 96
 var Worker = function (name, host, port) {
@@ -100,6 +109,7 @@ var Worker = function (name, host, port) {
100 109
 
101 110
   /*
102 111
    * Callback for blpop responses.
  112
+   *
103 113
    * @private
104 114
    * @param {Error} error Possible error from Redis
105 115
    * @param data The data from redis.
@@ -127,6 +137,7 @@ Worker.prototype.constructor = Worker;
127 137
 
128 138
 /**
129 139
  * Creates a new Worker object.
  140
+ *
130 141
  * @param {String} host The host name for the Redis client.
131 142
  * @param {Number} port The port number for the Redis client.
132 143
  * @returns {Worker}
@@ -162,6 +173,7 @@ Worker.prototype.stop = function () {
162 173
 
163 174
 /**
164 175
  * Job prototype used by the workers.
  176
+ *
165 177
  * @constructor
166 178
  * @param {Worker} parent Parent prototype
167 179
  * @param payload The data to set as the payload.
@@ -182,6 +194,7 @@ exports.Job = Job;
182 194
 
183 195
 /**
184 196
  * Add an error the the job.
  197
+ *
185 198
  * @param {Error} error The error object to add.
186 199
  */
187 200
 Job.prototype.reportError = function (error) {
@@ -191,6 +204,7 @@ Job.prototype.reportError = function (error) {
191 204
 
192 205
 /**
193 206
  * Re-process the job by adding back to the queue.
  207
+ *
194 208
  * @param {Function} callback The optional callback
195 209
  */
196 210
 Job.prototype.retry = function (callback) {

0 notes on commit 93cae98

Please sign in to comment.
Something went wrong with that request. Please try again.