I don't think that is a bug but rather an issue for me, lemme explain...
I have a subscription to the realtime updates for a particular tag.
When receiving the POST request from instagram (notifying new medias have arrived), I get the following:
[
{
changed_aspect: 'media',
object: 'tag',
object_id: 'nofilter',
time: 1401648280,
subscription_id: 5165151,
data: {}
}
]
Then, in order to fetch the corresponding new content, I fetch recent medias and filter them by comparing their created_time
to the subscription's time, ie: media.created_time >= 1401648280
Unfortunately, sometimes, the media.created_time
is 1ms behind: 1401648279
... So that media isn't return in my filtered list of "new" medias.
--
I understand why subscription's time can be later and I can give a tolerance for my filter comparison: time - media.created_time <= X
but I don't know how to set X
: 10ms ? 100ms? 2s?
Do you know that value? A guaranteed amount of time within the subscription will be generated after new media updates?
Thank you in advance and best regards