Skip to content

Commit

Permalink
Make targetValue int64
Browse files Browse the repository at this point in the history
Signed-off-by: Ram Cohen <[email protected]>
  • Loading branch information
RamCohen committed Mar 23, 2022
1 parent 90bcc0f commit 07df3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/scalers/gcp_stackdriver_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type stackdriverScaler struct {
type stackdriverMetadata struct {
projectID string
filter string
targetValue int
targetValue int64
metricName string

gcpAuthorization *gcpAuthorizationMetadata
Expand Down Expand Up @@ -82,7 +82,7 @@ func parseStackdriverMetadata(config *ScalerConfig) (*stackdriverMetadata, error
meta.metricName = GenerateMetricNameWithIndex(config.ScalerIndex, name)

if val, ok := config.TriggerMetadata["targetValue"]; ok {
targetValue, err := strconv.Atoi(val)
targetValue, err := strconv.ParseInt(val, 10, 64)
if err != nil {
gcpStackdriverLog.Error(err, "Error parsing targetValue")
return nil, fmt.Errorf("error parsing targetValue: %s", err.Error())
Expand Down

0 comments on commit 07df3da

Please sign in to comment.