Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dropbox/dropbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module.exports = function(RED) {
function DropboxInNode(n) {
RED.nodes.createNode(this,n);
this.filepattern = n.filepattern || "";
this.checkInterval = n.checkInterval || 600000;
this.checkInterval = n.checkInterval || 60000;
this.dropboxConfig = RED.nodes.getNode(n.dropbox);
var credentials = this.dropboxConfig ? this.dropboxConfig.credentials : {};
if (!credentials.appkey || !credentials.appsecret ||
Expand All @@ -61,10 +61,11 @@ module.exports = function(RED) {
return;
}
node.status({});
if (!node.state) {
if (!node.state) { // when executed for the first time only save cursor
node.state = data.cursor();
}
else {
else {
node.state = data.cursor(); // reset cursor to get only changes since last poll
var changes = data.changes;
for (var i = 0; i < changes.length; i++) {
var change = changes[i];
Expand Down