♻️ Refactor exporter

- Migrate from puppeteer to playwright
- Fix many lifecycle and resource usage issues
- Add redis integration
- Enable multiple exportation
- Enable asynchronos exportation (with progress reporting)
This commit is contained in:
Andrey Antukh 2022-03-18 12:34:02 +01:00 committed by Alonso Torres
parent f0a9889f33
commit 4a9e38a221
21 changed files with 1366 additions and 1017 deletions

View file

@ -6,24 +6,23 @@
(ns app.core
(:require
["process" :as proc]
[app.browser :as bwr]
[app.redis :as redis]
[app.common.logging :as l]
[app.config]
[app.http :as http]
[app.sentry :as sentry]
[promesa.core :as p]))
(enable-console-print!)
(l/initialize!)
(sentry/init!)
(defonce state (atom nil))
(defn start
[& args]
(l/info :msg "initializing")
(p/do!
(bwr/init)
(redis/init)
(http/init)))
(def main start)
@ -36,5 +35,9 @@
(l/info :msg "stoping")
(p/do!
(bwr/stop)
(redis/stop)
(http/stop)
(done)))
(proc/on "uncaughtException" (fn [cause]
(js/console.error cause)))