Skip to content

Commit

Permalink
Increase Dexcom task duration maximum and available period
Browse files Browse the repository at this point in the history
- Minor changes for local debugging
  • Loading branch information
darinkrauss committed Feb 7, 2024
1 parent 23549ab commit 9f67aa8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
34 changes: 14 additions & 20 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
"type": "go",
"request": "launch",
"mode": "debug",
"host": "127.0.0.1",
"port": 19222,
"program": "${workspaceRoot}/services/auth",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application/version.Base=0.0.0 -X github.com/tidepool-org/platform/application/version.ShortCommit=00000000 -X github.com/tidepool-org/platform/application/version.FullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/env.sh",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application.VersionBase=0.0.0 -X github.com/tidepool-org/platform/application.VersionShortCommit=00000000 -X github.com/tidepool-org/platform/application.VersionFullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/auth.env",
"env": {
"TIDEPOOL_DEBUG_NAME": "auth"
}
Expand All @@ -20,11 +18,9 @@
"type": "go",
"request": "launch",
"mode": "debug",
"host": "127.0.0.1",
"port": 19220,
"program": "${workspaceRoot}/services/data",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application/version.Base=0.0.0 -X github.com/tidepool-org/platform/application/version.ShortCommit=00000000 -X github.com/tidepool-org/platform/application/version.FullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/env.sh",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application.VersionBase=0.0.0 -X github.com/tidepool-org/platform/application.VersionShortCommit=00000000 -X github.com/tidepool-org/platform/application.VersionFullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/data.env",
"env": {
"TIDEPOOL_DEBUG_NAME": "data"
}
Expand All @@ -34,11 +30,9 @@
"type": "go",
"request": "launch",
"mode": "debug",
"host": "127.0.0.1",
"port": 19223,
"program": "${workspaceRoot}/services/notification",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application/version.Base=0.0.0 -X github.com/tidepool-org/platform/application/version.ShortCommit=00000000 -X github.com/tidepool-org/platform/application/version.FullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/env.sh",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application.VersionBase=0.0.0 -X github.com/tidepool-org/platform/application.VersionShortCommit=00000000 -X github.com/tidepool-org/platform/application.VersionFullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/notification.env",
"env": {
"TIDEPOOL_DEBUG_NAME": "notification"
}
Expand All @@ -48,11 +42,9 @@
"type": "go",
"request": "launch",
"mode": "debug",
"host": "127.0.0.1",
"port": 19224,
"program": "${workspaceRoot}/services/task",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application/version.Base=0.0.0 -X github.com/tidepool-org/platform/application/version.ShortCommit=00000000 -X github.com/tidepool-org/platform/application/version.FullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/env.sh",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application.VersionBase=0.0.0 -X github.com/tidepool-org/platform/application.VersionShortCommit=00000000 -X github.com/tidepool-org/platform/application.VersionFullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/task.env",
"env": {
"TIDEPOOL_DEBUG_NAME": "task"
}
Expand All @@ -62,17 +54,19 @@
"type": "go",
"request": "launch",
"mode": "debug",
"host": "127.0.0.1",
"port": 19221,
"program": "${workspaceRoot}/services/user",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application/version.Base=0.0.0 -X github.com/tidepool-org/platform/application/version.ShortCommit=00000000 -X github.com/tidepool-org/platform/application/version.FullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/env.sh",
"buildFlags": "-ldflags '-X github.com/tidepool-org/platform/application.VersionBase=0.0.0 -X github.com/tidepool-org/platform/application.VersionShortCommit=00000000 -X github.com/tidepool-org/platform/application.VersionFullCommit=0000000000000000000000000000000000000000'",
"envFile": "${workspaceRoot}/user.env",
"env": {
"TIDEPOOL_DEBUG_NAME": "user"
}
}
],
"compounds": [
{
"name": "auth, task",
"configurations": ["auth", "task"]
},
{
"name": "auth, data, task",
"configurations": ["auth", "data", "task"]
Expand Down
4 changes: 2 additions & 2 deletions application/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ func NewProvider(prefix string, scopes ...string) (*ProviderImpl, error) {
}

name := filepath.Base(os.Args[0])
if strings.EqualFold(name, "debug") {
name = configReporter.WithScopes(name).GetWithDefault("name", name)
if strings.EqualFold(name, "debug") || strings.HasPrefix(name, "__debug_bin") {
name = configReporter.WithScopes("debug").GetWithDefault("name", name)
}

configReporter = configReporter.WithScopes(name).WithScopes(scopes...)
Expand Down
6 changes: 3 additions & 3 deletions dexcom/fetch/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
)

const (
AvailableAfterDurationMaximum = 75 * time.Minute
AvailableAfterDurationMinimum = 45 * time.Minute
AvailableAfterDurationMaximum = 135 * time.Minute
AvailableAfterDurationMinimum = 105 * time.Minute
DataSetSize = 2000
TaskDurationMaximum = 5 * time.Minute
TaskDurationMaximum = 10 * time.Minute
)

var initialDataTime = time.Date(2015, 1, 1, 0, 0, 0, 0, time.UTC)
Expand Down

0 comments on commit 9f67aa8

Please sign in to comment.