Skip to content

Commit 5fe1d16

Browse files
committed
Merge pull request #45 from AnyFetch/update-readme
Update readme
2 parents 7fa2c80 + 0fff705 commit 5fe1d16

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ And then:
4242
var anyfetchHydrater = require('anyfetch-hydrater');
4343

4444
var config = {
45-
'hydrater_function': 'absolute/path/to/my/function.js'
45+
'hydrater_function': 'absolute/path/to/my/function.js',
46+
'appName': 'Name of your application that will be used in the redis queue',
47+
'redisUrl': 'Url of the redis server. If it is not set, it will use localhost on the default port'
4648
};
4749

4850
var hydrationServer = anyfetchHydrater.createServer(config);
@@ -61,14 +63,13 @@ POST <your_hydrater_server_url>/hydrate
6163
}
6264
```
6365

64-
> In some cases, you may want to bypass the lib and send the result yourself. The property `cb.callbackUrl` tells you where to send the data back to the client. After having sent the data, call `cb()` *without any error or document*. This will finalize hydration, clean the file and start the next task.
66+
> In some cases, you may want to bypass the lib and send the result yourself. The property `cb.callbackUrl` tells you where to send the data back to the client. After having sent the data, call `cb(null, null)` *without any error or document*. This will finalize hydration, clean the file and start the next task.
6567
6668
### Optional parameters
6769
`createServer()` takes an object hash for argument. `hydrater_function` is mandatory, optional values includes:
6870

69-
* `concurrency`: max number of simultaneous calls to your hydrater function (default: 1)
70-
* `logger`: function to use for logging. It will get called with strings when a task is started or ended, default to `console.log`.
71-
* `errLogger`: function to use for logging errors, default to `console.warn`.
71+
* `concurrency`: max number of simultaneous calls to your hydrater function (default: 1). One child process per concurrency will spawn.
72+
* `opbeat`: an object used for opbeat notifications. It must have `organizationId`, `appId` and `secretToken` keys.
7273

7374
Errors
7475
------

0 commit comments

Comments
 (0)