rss-to-activitypub/queueFeeds.js
2019-04-29 13:36:04 -07:00

27 lines
451 B
JavaScript

const Database = require('better-sqlite3');
const db = new Database('bot-node.db');
const Jackd = require('jackd');
const beanstalkd = new Jackd();
async function foo() {
// get all feeds from DB
let feeds = db.prepare('select feed from feeds').all();
console.log('!!!',feeds.length);
let count = 0;
await beanstalkd.connect()
for (feed of feeds) {
await beanstalkd.put(feed.feed)
}
await beanstalkd.disconnect()
}
foo()