mirror of
https://github.com/dariusk/rss-to-activitypub.git
synced 2024-11-22 17:29:19 +02:00
27 lines
449 B
JavaScript
27 lines
449 B
JavaScript
import Database from 'better-sqlite3';
|
|
import Jackd from 'jackd';
|
|
|
|
const beanstalkd = new Jackd();
|
|
const db = new Database('bot-node.db');
|
|
|
|
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 (let feed of feeds) {
|
|
await beanstalkd.put(feed.feed)
|
|
}
|
|
|
|
await beanstalkd.disconnect()
|
|
|
|
}
|
|
|
|
foo();
|