After waiting ~22 hours for a package to be promoted on Gusto's ultra-fast (i.e. 0.25) channel, I started digging into why.
Problem
The logs indicate the gusto_scope package was not eligible for promotion. This repo is using this logic to calculate how many days have passed. It uses the days attribute, which represents the whole number of days of a time span excluding any remaining seconds:
After waiting ~22 hours for a package to be promoted on Gusto's ultra-fast (i.e. 0.25) channel, I started digging into why.
Problem
The logs indicate the
gusto_scope
package was not eligible for promotion. This repo is using this logic to calculate how many days have passed. It uses thedays
attribute, which represents the whole number of days of a time span excluding any remaining seconds:Using the existing logic, this package was last promoted 0 days ago, but when considering seconds, it was actually last promoted ~0.91 days ago:
This seconds component is essential for quickly promoted packages, that may have a channel shifted promotion period much less than
1.0
.Solution
When computing the "days since promotion", include the
seconds
component.