add a end boundary for the query
the upper limit in the query is used to avoid consuming too much memory when generating stats with alot of queue_log after the current period. This is what usually happens after a `xivo-stat clean_db`. I used an arbitrary end value of 1 day over the end of the period we are currently working on. The bounds of each call is checked in the loop lower in the function.
Showing with 4 additions and 0 deletions