You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As-is, it seems impossible to simply poll the queue without blocking. This is noticed in some tests where we call popMessage() on an empty queue and effectively slam the database for five seconds.
Ideally, I'd like to be able to specify zero as my $interval to do a single query. This would require changing the while loop to a do while. Thoughts?
Per discussion with @henrikbjorn, other drivers (not database and filesystem) do block on popMessage() since many of those services bill by request. For database and filesystem drivers, having $interval default to zero would allow users to handle polling on their own (outside of the driver).
Suggestion is to refactor while to do while, which will support an $interval of zero and allow for a single poll. Additionally, the database and filesystem sleeps should probably be made consistent.
The text was updated successfully, but these errors were encountered:
jmikola
changed the title
Make poll loops in database and filesystem drivers more configurable
Make poll loops in DB and filesystem drivers more configurable
Dec 19, 2014
See #133 (comment) for context.
Per discussion with @henrikbjorn, other drivers (not database and filesystem) do block on
popMessage()
since many of those services bill by request. For database and filesystem drivers, having$interval
default to zero would allow users to handle polling on their own (outside of the driver).Suggestion is to refactor
while
todo while
, which will support an$interval
of zero and allow for a single poll. Additionally, the database and filesystem sleeps should probably be made consistent.The text was updated successfully, but these errors were encountered: