Skip to content

Commit 7b12f73

Browse files
authored
convert job ID to int64 instead of int32 (#902)
1 parent f166720 commit 7b12f73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compute/resource_job.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (a JobsAPI) Start(jobID int64, timeout time.Duration) error {
101101
}
102102

103103
func (a JobsAPI) Restart(id string, timeout time.Duration) error {
104-
jobID, err := strconv.ParseInt(id, 10, 32)
104+
jobID, err := strconv.ParseInt(id, 10, 64)
105105
if err != nil {
106106
return err
107107
}
@@ -137,7 +137,7 @@ func (a JobsAPI) Create(jobSettings JobSettings) (Job, error) {
137137

138138
// Update updates a job given the id and a new set of job settings
139139
func (a JobsAPI) Update(id string, jobSettings JobSettings) error {
140-
jobID, err := strconv.ParseInt(id, 10, 32)
140+
jobID, err := strconv.ParseInt(id, 10, 64)
141141
if err != nil {
142142
return err
143143
}
@@ -149,7 +149,7 @@ func (a JobsAPI) Update(id string, jobSettings JobSettings) error {
149149

150150
// Read returns the job object with all the attributes
151151
func (a JobsAPI) Read(id string) (job Job, err error) {
152-
jobID, err := strconv.ParseInt(id, 10, 32)
152+
jobID, err := strconv.ParseInt(id, 10, 64)
153153
if err != nil {
154154
return
155155
}
@@ -164,7 +164,7 @@ func (a JobsAPI) Read(id string) (job Job, err error) {
164164

165165
// Delete deletes the job given a job id
166166
func (a JobsAPI) Delete(id string) error {
167-
jobID, err := strconv.ParseInt(id, 10, 32)
167+
jobID, err := strconv.ParseInt(id, 10, 64)
168168
if err != nil {
169169
return err
170170
}

0 commit comments

Comments
 (0)