in Hub: registration_timeout must be an integer, but heartmonitor.period is CFloat #1281

Closed
rameshvs opened this Issue Jan 17, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@rameshvs

In parallel.controller.hub, the registration_timeout is set to max(5000, 2*self.heartmonitor.period) and must be an integer, but self.heartmonitor.period is a float.

So, when the period is more than 2500 (doesn't happen with the default value of 1000; only with user-modified values that are higher), a validation error occurs and the hub doesn't start.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Jan 17, 2012

Member

@minrk, a simple int(...) around that should do the trick, no?

Member

fperez commented Jan 17, 2012

@minrk, a simple int(...) around that should do the trick, no?

@ghost ghost assigned minrk Jan 17, 2012

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Jan 17, 2012

Member

Indeed, that would fix it, though there's no reason the two shouldn't be the same type. Since these are millisecond times, I will make them both Integer (sub millisecond precision makes no sense).

Member

minrk commented Jan 17, 2012

Indeed, that would fix it, though there's no reason the two shouldn't be the same type. Since these are millisecond times, I will make them both Integer (sub millisecond precision makes no sense).

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Jan 17, 2012

Member

PR #1283 issues making HeartMonitor.period an integer.

Member

minrk commented Jan 17, 2012

PR #1283 issues making HeartMonitor.period an integer.

@minrk minrk closed this in 8e9cbc1 Jan 18, 2012

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Merge pull request #1283 from minrk/i1281
HeartMonitor.period is now an Integer

millisecond times should generally be integers, because any time they are specified with fractional precision it is probable that the user believes the units are seconds, and an error should be raised.

closes #1281
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment