Commit e00d9b0b authored by 张辰's avatar 张辰

1

parent 5f6d2e58
...@@ -20,22 +20,6 @@ public class PagePdfGenUtils { ...@@ -20,22 +20,6 @@ public class PagePdfGenUtils {
try { try {
BrowserFetcher.downloadIfNotExist(null); BrowserFetcher.downloadIfNotExist(null);
for (int i = 0;i < 5; i++) {
log.info("##### start genPdf " + i);
Thread t = new Thread(new Runnable() {
@Override
public void run() {
try {
genPdf("https://testtamper.tanpuyun.com/hangjiapc/#/billingPdf");
} catch (Throwable e) {
log.error("#### error", e);
e.printStackTrace();
}
}
});
t.start();
}
ArrayList<String> argList = new ArrayList<>(); ArrayList<String> argList = new ArrayList<>();
LaunchOptions options = new LaunchOptionsBuilder() LaunchOptions options = new LaunchOptionsBuilder()
.withExecutablePath("/usr/bin/google-chrome") .withExecutablePath("/usr/bin/google-chrome")
...@@ -48,6 +32,24 @@ public class PagePdfGenUtils { ...@@ -48,6 +32,24 @@ public class PagePdfGenUtils {
argList.add("--enable-logging=/data/logs/chrome22.log --v=1"); argList.add("--enable-logging=/data/logs/chrome22.log --v=1");
browser = Puppeteer.launch(options); browser = Puppeteer.launch(options);
// for (int i = 0;i < 5; i++) {
// log.info("##### start genPdf " + i);
// Thread t = new Thread(new Runnable() {
// @Override
// public void run() {
// try {
// genPdf("https://testtamper.tanpuyun.com/hangjiapc/#/billingPdf");
// } catch (Throwable e) {
// log.error("#### error", e);
// e.printStackTrace();
// }
// }
// });
// t.start();
// }
isBrowserClosed = false; isBrowserClosed = false;
} catch (Throwable t) { } catch (Throwable t) {
log.error("error in init genPdf", t); log.error("error in init genPdf", t);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment