Skip to content

Commit

Permalink
Validation of nw vs europe-west2 and the like for schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
frikky committed Jan 24, 2025
1 parent 3ba5e4a commit 9e1e1ee
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -5040,10 +5040,16 @@ func GetGcpSchedule(ctx context.Context, id string) (*ScheduleOld, error) {
log.Printf("[ERROR] Client error: %s", err)
return schedule, err
}

location := "europe-west2"
if len(os.Getenv("SHUFFLE_GCEPROJECT")) > 0 && len(os.Getenv("SHUFFLE_GCEPROJECT_LOCATION")) > 0 {
if len(os.Getenv("SHUFFLE_GCE_LOCATION")) > 0 {
location = os.Getenv("SHUFFLE_GCE_LOCATION")
}

if len(os.Getenv("SHUFFLE_GCE_LOCATION")) == 0 && len(os.Getenv("SHUFFLE_GCEPROJECT_LOCATION")) > 0 {
location = os.Getenv("SHUFFLE_GCEPROJECT_LOCATION")
}

req := &schedulerpb.GetJobRequest{
Name: fmt.Sprintf("projects/%s/locations/%s/jobs/schedule_%s", gceProject, location, id),
}
Expand Down Expand Up @@ -18540,7 +18546,7 @@ func PrepareSingleAction(ctx context.Context, user User, fileId string, body []b
if err != nil {
log.Printf("[ERROR] Failed getting auth for single action: %s", err)
} else {
latestTimestamp := int64(0)
//latestTimestamp := int64(0)
for _, auth := range auths {
if auth.App.ID != fileId {
continue
Expand Down

0 comments on commit 9e1e1ee

Please sign in to comment.