Skip to content

Commit 4682edd

Browse files
committed
Merge pull request #651 from oleghind/patch-1
Support of setting TTL through JSON API options
2 parents 1d5c01d + 0aaf036 commit 4682edd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/http/routes/json.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ exports.createJob = function( req, res ) {
153153
if( options.searchKeys ) job.searchKeys(options.searchKeys);
154154
if( options.backoff ) job.backoff(options.backoff);
155155
if( options.removeOnComplete ) job.removeOnComplete(options.removeOnComplete);
156-
156+
if( options.ttl ) job.ttl(options.ttl);
157+
157158
job.save(function( err ) {
158159
if( err ) {
159160
return next({ error: err.message }, null, 500);

0 commit comments

Comments
 (0)