RSS controller will update feeds before starting engine
This commit is contained in:
@@ -15,6 +15,7 @@ exports.RSSController = class RSSController {
|
|||||||
|
|
||||||
async start(){
|
async start(){
|
||||||
log.INFO("Starting RSS Controller");
|
log.INFO("Starting RSS Controller");
|
||||||
|
await libCore.updateFeeds(this.client);
|
||||||
while(true){
|
while(true){
|
||||||
await new Promise(resolve => setTimeout(resolve, timeoutValue));
|
await new Promise(resolve => setTimeout(resolve, timeoutValue));
|
||||||
this.collectLatestPosts();
|
this.collectLatestPosts();
|
||||||
@@ -24,5 +25,6 @@ exports.RSSController = class RSSController {
|
|||||||
async collectLatestPosts(){
|
async collectLatestPosts(){
|
||||||
log.INFO("Updating sources");
|
log.INFO("Updating sources");
|
||||||
libCore.updateFeeds(this.client)
|
libCore.updateFeeds(this.client)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user