Closed kefo closed 10 months ago
I don't think we need both functions in the psuedocode, be we should record the last update seen. Maybe:
# uri_of_first_activity_stream_page = Input URI of first Activity Stream page
# from_date = Input date of last update previously processed
# last_update = Global record of last update
func process_as(date_from, as_uri)
activity_stream_page = get as_uri
for each activity in activity_stream_page
if activity.published >= date_from then
process activity by type
last_update = activity.published
else
return
if activity.last == true and activity.published >= date_from then
process_as(date_from, activity_stream.next)
end func
process_as(date_from, uri_of_first_activity_stream_page)
# for next run: date_from = last_update
Righty, so let's try this. I knew - I felt it - that the pseudocode was overwrought but I just couldn't see it.
Let me know if the pseudocode is overwrought. Wordsmith away; I have no pride.