Open jacquerie opened 7 years ago
CC: @kaplun @mathieugrives @StellaCh
The moral of the story is that we don't need any synchronization mechanism implemented or updated on legacy, as we can recover this information at push time (and write it in the record when labs is master).
In order to avoid crawling HAL to know which records on HAL correspond to which records on INSPIRE, we can parse their response when trying to create a new, duplicated, record and instead update that record on their system.
For example, let's consider https://hal.archives-ouvertes.fr/hal-01584710, which is the HAL push of https://inspirehep.net/record/1519372. When we run
we get a
sword2.exceptions.HTTPResponseError
back which contains acontent
attribute withwhich should be easy enough to parse (although wrapping JSON errors in XML is... perplexing).