mirror of
https://github.com/dariusk/rss-to-activitypub.git
synced 2024-11-23 01:39:19 +02:00
28 lines
491 B
JavaScript
28 lines
491 B
JavaScript
const Database = require('better-sqlite3');
|
|
const db = new Database('data/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({host: 'beanstalkd', port: 11300 })
|
|
|
|
for (feed of feeds) {
|
|
await beanstalkd.put(feed.feed)
|
|
}
|
|
|
|
await beanstalkd.disconnect()
|
|
|
|
}
|
|
|
|
foo()
|