Records a browser the provider has just launched.
A browser that arrives while cleanup is running, or after the attempt has been sealed, is closed at once rather than tracked. An abandoned scrape keeps launching browsers after its deadline fires, and once the attempt is over no later cleanup exists to collect them.
Provider browser handle to track.
Number of browsers currently tracked.
Closes and forgets every tracked browser.
Logger used to report browsers that were still running.
Number of browsers that were still connected and had to be closed.
Closes every tracked browser and refuses to track any more.
closeAll runs after every retry, so it cannot latch — the next retry has
to be able to track its own browsers. Sealing marks the point where no
further retry follows, so a browser an abandoned scrape launches from here
on is closed on arrival instead of outliving the import.
Logger used to report browsers that were still running.
Number of browsers that were still connected and had to be closed.
Collects live provider browsers so a single attempt can reclaim all of them.