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

Feature/update cronjob name #103

Open Anticmos opened 2 years ago

Anticmos commented 2 years ago

Hi!

As I was making use of this project I ran into a case where if I ran the deploy twice it would not always overwrite the previous CRON job and I also did not have enough control over the name of the cron job for subsequent runs.

This can cause confusion as GCP will just spit out:

ERROR: (gcloud.scheduler.jobs.create.pubsub) ALREADY_EXISTS: Job .../jobs/cf_logs_cron already exists.

Please take a look at the addition of a new variable!

Looking forward to feedback. Thanks!

Anticmos commented 1 year ago

@shagamemnon Any thoughts?

shagamemnon commented 1 year ago

Thanks @Anticmos. Can you please create a default string value for the CRON_JOB_NAME in deploy.sh, for example:

# deploy.sh
CRON_JOB_NAME='cf_logs_cron'
Anticmos commented 1 year ago

Hi @shagamemnon I believe it is already there: https://github.com/cloudflare/cloudflare-gcp/pull/103/files#diff-1c36d0bec3d940c4f51ce21b6d419a07cf300a86f1e6ac11f3b05a0df9a191eaR14

Anticmos commented 1 year ago

@shagamemnon Any updates on this?

Anticmos commented 8 months ago

@shagamemnon Any updates on this?

z