CrossTalkPM/tests/api/redisAPITest.ts

18 lines
514 B
TypeScript

import { CommentFetcher } from "../../src/rdrama/services/CommentFetcher";
import SessionManager from "../../src/rdrama/session/SessionManager"
main();
async function main(): Promise<void> {
console.log('1')
const axiosSession = SessionManager.getInstance()
console.log('2')
let maxPages = 5
for (let page = 1; page <= maxPages; page++) {
const newComments = await CommentFetcher.fetchComments(page)
}
console.log('3')
await axiosSession.shutdown()
console.log('4')
}