summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@nomic.retiolum>2014-03-17 04:22:33 +0100
committertv <tv@nomic.retiolum>2014-03-17 04:22:33 +0100
commit7f6c1d9b0f058fb0b22717686eb9ef5dcad794af (patch)
treeac590313517ad0c55ab88f15b9adb45b6b8e4365
parent056e4fa611a780caddc0b3a61d0de587f6d5cb79 (diff)
parent5fbf714096ef65c98cabb54cbc08641f37ffa462 (diff)
Merge branch 'master' of lassulus:painload
-rw-r--r--news/newsbot.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/news/newsbot.js b/news/newsbot.js
index a422d867..80bb95b1 100644
--- a/news/newsbot.js
+++ b/news/newsbot.js
@@ -12,6 +12,7 @@ var master_nick = 'knews'
var news_channel = '#news'
var feeds_file = 'new_feeds'
var feedbot_loop_delay = 60 * 1000 // [ms]
+var feedbot_create_delay = 200 // [ms]
var url_shortener_host = 'go'
var slaves = {}
@@ -51,7 +52,7 @@ function main () {
.filter(function (line) {
return line.length > 0
})
- .forEach(function (line) {
+ .forEach(function (line, i) {
var parts = line.split('|')
if (parts.length !== 3) {
console.log('bad new_feeds line ' + lines + ': ' + line)
@@ -62,7 +63,9 @@ function main () {
var uri = parts[1]
var channels = parts[2].split(' ')
- return create_feedbot(nick, uri, channels)
+ setTimeout(function () {
+ return create_feedbot(nick, uri, channels)
+ }, i*feedbot_create_delay)
})
})
}