Send a setup message when the plugin start. (#3101)

This commit is contained in:
Peter Hedenskog 2020-07-24 17:16:07 +02:00 committed by GitHub
parent 995a20bb14
commit 05175cb9bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -61,7 +61,10 @@ module.exports = {
},
async processMessage(message, queue) {
if (message.type === 'html.finished') {
if (message.type === 'sitespeedio.setup') {
// Let other plugins know that the GCS plugin is alive
queue.postMessage(this.make('gcs.setup'));
} else if (message.type === 'html.finished') {
const make = this.make;
const gcsOptions = this.gcsOptions;
const baseDir = this.storageManager.getBaseDir();

View File

@ -82,7 +82,10 @@ module.exports = {
},
async processMessage(message, queue) {
if (message.type === 'html.finished') {
if (message.type === 'sitespeedio.setup') {
// Let other plugins know that the s3 plugin is alive
queue.postMessage(this.make('s3.setup'));
} else if (message.type === 'html.finished') {
const make = this.make;
const s3Options = this.s3Options;
const baseDir = this.storageManager.getBaseDir();