Skip to content

Commit 9e1e1ee

Browse files
committed
Validation of nw vs europe-west2 and the like for schedules
1 parent 3ba5e4a commit 9e1e1ee

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

shared.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5040,10 +5040,16 @@ func GetGcpSchedule(ctx context.Context, id string) (*ScheduleOld, error) {
50405040
log.Printf("[ERROR] Client error: %s", err)
50415041
return schedule, err
50425042
}
5043+
50435044
location := "europe-west2"
5044-
if len(os.Getenv("SHUFFLE_GCEPROJECT")) > 0 && len(os.Getenv("SHUFFLE_GCEPROJECT_LOCATION")) > 0 {
5045+
if len(os.Getenv("SHUFFLE_GCE_LOCATION")) > 0 {
5046+
location = os.Getenv("SHUFFLE_GCE_LOCATION")
5047+
}
5048+
5049+
if len(os.Getenv("SHUFFLE_GCE_LOCATION")) == 0 && len(os.Getenv("SHUFFLE_GCEPROJECT_LOCATION")) > 0 {
50455050
location = os.Getenv("SHUFFLE_GCEPROJECT_LOCATION")
50465051
}
5052+
50475053
req := &schedulerpb.GetJobRequest{
50485054
Name: fmt.Sprintf("projects/%s/locations/%s/jobs/schedule_%s", gceProject, location, id),
50495055
}
@@ -18540,7 +18546,7 @@ func PrepareSingleAction(ctx context.Context, user User, fileId string, body []b
1854018546
if err != nil {
1854118547
log.Printf("[ERROR] Failed getting auth for single action: %s", err)
1854218548
} else {
18543-
latestTimestamp := int64(0)
18549+
//latestTimestamp := int64(0)
1854418550
for _, auth := range auths {
1854518551
if auth.App.ID != fileId {
1854618552
continue

0 commit comments

Comments
 (0)