Skip to content

Commit

Permalink
Expose allow_foreign_docs to the caller
Browse files Browse the repository at this point in the history
  • Loading branch information
jhs committed Sep 23, 2013
1 parent 442ffa9 commit 5f1909a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions queue.js
Expand Up @@ -17,6 +17,7 @@ var defaultable = require('defaultable');
defaultable(module,
{ 'visibility_timeout' : 30
, 'browser_attachments': false
, 'allow_foreign_docs' : false
}, function(module, exports, DEFS, require) {


Expand Down Expand Up @@ -57,6 +58,7 @@ function Queue (opts) {

self.cache_confirmation = true;
self.browser_attachments = !!(opts.browser_attachments);
self.allow_foreign_docs = opts.allow_foreign_docs

self.log = debug('cqs:queue:' + (self.name || 'untitled'));
}
Expand Down Expand Up @@ -129,6 +131,8 @@ Queue.prototype.create = function create_queue(callback) {
if(!ddoc._rev)
ddoc = new queue_ddoc.DDoc

ddoc.allow_foreign_docs = self.allow_foreign_docs

ddoc.queues[self.name] = ddoc.queues[self.name] ||
{ ApproximateNumberOfMessages : 0
, ApproximateNumberOfMessagesNotVisible: 0
Expand Down

0 comments on commit 5f1909a

Please sign in to comment.