File size: 331 Bytes
652f343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { getPendingTasks } from "./database/getPendingTasks.mts"

export const main = async () => {
  const tasks = await getPendingTasks()
  if (!tasks.length) {
    setTimeout(() => {
      main()
    }, 500)
    return
  }

  console.log(`there are ${tasks.length} pending tasks`)
  
  setTimeout(() => {
    main()
  }, 1000)
}