-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow Chrome instance to launch on first run and persist for future runs #308
Comments
If you pass a As recommended in the |
I am enquiring for a solution specifically for Heroku. As far as I'm aware, Heroku has it's own process manager to ensure that a web process keeps running and restarts after it crashes. So as far as I'm aware, it's not possible to install pm2 on it and use it to keep Chrome running. What I am asking for, is a solution with this library. Since it is obviously capable of starting chrome instance on demand if needed, would it not be capable of starting Chrome and keep it running so that any future PDF generation calls can utilise this existing Chrome instance? For example, if we don't specify host/port, and it launches a Chrome instance, can we pass a flag like |
Ah, I understand the intention, thank you for explaining more. I think your best action would be to directly use what this library uses under the hood, This library isn't currently designed to hold any state between runs, but I will mark this as a feature request. |
Great, thank you I will look into that library.
…On Thu, 5 Aug 2021 at 14:17, Seth Westphal ***@***.***> wrote:
Ah, I understand the intention, thank you for explaining more.
I think your best action would be to directly use what this library uses
under the hood, chrome-launcher
<https://github.com/GoogleChrome/chrome-launcher>.
This library isn't currently designed to hold any state between runs, but
I will mark this as a feature request.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#308 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADXYQXSRQG76GP6NOK25ELT3HYCRANCNFSM5BN7Y7CQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
This seems to work well, using the Chrome launcher under the hood. We now use it to launch an instance of Chrome and pass the port to this library, which then reuses this instance rather than launching one itself (and terminating it afterwards). Would still be keen on a flag to possible keep the instance alive 👍🏼 |
Hi @westy92 , we're using this library on Heroku and it's doing the job of generating PDF files without issues. However, we are trying to ascertain whether the Heroku buildpack starts and runs chrome in the background or whether this library is forced to start it up for each use.
Is there a way to log/debug that using this library?
And is there perhaps a flag or setting we can use to keep the app running after a first PDF has been generated?
Keen to hear your suggestions/tips, as I think currently it's starting chrome up for every PDF causing needless overhead.
I have a related ticket open at heroku/heroku-buildpack-google-chrome#111
The text was updated successfully, but these errors were encountered: