Skip to content

Commit 92ff997

Browse files
authored
Merge pull request #16 from grisu48/float64
Add float64 parsing branch
2 parents 42fbb96 + a014e36 commit 92ff997

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rabbitmq.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ func (sub *RabbitMQSubscription) ReceiveJobStatus() (JobStatus, error) {
134134
status.ID = unboxed
135135
} else if unboxed, ok := istatus.ID.(int); ok {
136136
status.ID = int64(unboxed)
137+
} else if unboxed, ok := istatus.ID.(float64); ok {
138+
// Values larger than int are sometimes parsed as float64
139+
status.ID = int64(float64(unboxed))
137140
} else {
138141
return status, fmt.Errorf("invalid ID type")
139142
}

0 commit comments

Comments
 (0)