cloudflare / cloudflare-gcp

Google Cloud Function to push json files from GC Storage to Big Query
Apache License 2.0
84 stars 49 forks source link

Fix GCP Error message with typo correction #79

Closed lukepon closed 3 years ago

lukepon commented 3 years ago

In the logpush-to-bigquery/index.js I receive the following message from the cloudfunction log:

ReferenceError: deadlineTime is not defined at module.exports.runLoadJob (/workspace/index.js:81:44)

    if (logFiles.length < 1) {
      return console.log(`No new logs at ${deadlineTime}`)
    }

I think this should be:

const [deadlineDate, deadlineDt] = [
....
    if (logFiles.length < 1) {
      return console.log(`No new logs at ${deadlineDate}`)
    }
lukepon commented 3 years ago

I'd do it myself but I don't know how to create a branch and a PR here, if you tell me how I'd be happy to fix it with the suggestion or other implementation.