Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions aws/aws.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
<label for="node-input-filepattern"><i class="fa fa-file"></i> Filename Pattern</label>
<input type="text" id="node-input-filepattern" placeholder="Filepattern">
</div>
<div class="form-row node-input-interval">
<label for="node-input-interval"><i class="fa fa-clock-o"></i> Interval between checks</label>
<input type="text" id="node-input-interval" placeholder="Interval">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
Expand All @@ -51,6 +55,7 @@
bucket: {required:true},
filepattern: {value:""},
name: {value:""},
interval: {value: 900000}
},
inputs:0,
outputs:1,
Expand Down
3 changes: 2 additions & 1 deletion aws/aws.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module.exports = function(RED) {
this.awsConfig = RED.nodes.getNode(n.aws);
this.region = n.region;
this.bucket = n.bucket;
this.interval = n.interval || 900000;
this.filepattern = n.filepattern || "";
var node = this;
var AWS = this.awsConfig ? this.awsConfig.AWS : null;
Expand Down Expand Up @@ -103,7 +104,7 @@ module.exports = function(RED) {
});
var interval = setInterval(function() {
node.emit("input", {});
}, 900000); // 15 minutes
}, node.interval); // 15 minutes
node.on("close", function() {
if (interval !== null) {
clearInterval(interval);
Expand Down