cozy-drive icon indicating copy to clipboard operation
cozy-drive copied to clipboard

Retrieval of new documents in service

Open paultranvan opened this issue 4 years ago • 0 comments

In the qualification service, we use an index on the cozyMetadata.updatedAt attribute to query the new documents to process, and we store the last processed file date in the settings. However, as mentioned here, this might be less robust than querying the changes feed, as incoming documents from the sharing do not update their cozyMetadata.updatedAt and thus, might not be processed by the migration service.

More broadly, the need to retrieve new documents in services exist in several places, with different strategies (index with a date stored in doctype in files and photos, index with a date retrieve from the jobs in contact, changes feed in banks, ...).

This would be nice to document the different strategies and eventually provide helpers for a preferred method.

paultranvan avatar Nov 19 '20 16:11 paultranvan