v2 poll file_time_limit
doesn't work properly
#1180
Labels
bug
Something isn't working
likely-fixed
likely fix is in the repository, success not confirmed yet.
Priority 5 - Defect
Missing and/or broken functionality - do not forget
v2only
only affects v2 branches.
We've found a problem when we're starting/stopping polls between sarracenia versions (2.21.04 and 2.24.08). The
ls
file in the poll cache doesn't recognize the new entries, before it gets the VIP back, so it will repost all the old files in thels
entry -> #1184.To mitigate this problem, we've found that we can specify a 'file age limit' within the poll, with
file_time_limit
.sarracenia/sarra/sr_poll.py
Lines 177 to 189 in bd095d8
When testing this config option on dev, I found that the
.seconds
method ONLY returns the seconds from the CURRENT DAY and not the total number of seconds. This means thatfile_time_limit Xd
(default is 60d) it should always return True and never filter out old files.file_time_limit Xh or Xm or Xs
the files will be ignored for some parts of the day, but then unignored once the timestamp is reached again on the following day.file_time_limit
so this is the reason why it has never caused problems until nowThe fix for this should be to pass
.total_seconds()
instead of.seconds
to get the actual total number of seconds.The text was updated successfully, but these errors were encountered: