Skip to content

Commit

Permalink
Merge pull request #651 from oleghind/patch-1
Browse files Browse the repository at this point in the history
Support of setting TTL through JSON API options
  • Loading branch information
behrad committed Jun 18, 2015
2 parents 1d5c01d + 0aaf036 commit 4682edd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/http/routes/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ exports.createJob = function( req, res ) {
if( options.searchKeys ) job.searchKeys(options.searchKeys);
if( options.backoff ) job.backoff(options.backoff);
if( options.removeOnComplete ) job.removeOnComplete(options.removeOnComplete);

if( options.ttl ) job.ttl(options.ttl);

job.save(function( err ) {
if( err ) {
return next({ error: err.message }, null, 500);
Expand Down

0 comments on commit 4682edd

Please sign in to comment.