Importing releases from api.discogs.com/releases often results in a timeout of the http_request. The module's import function still reports these releases as successful and will generate empty nodes without titles.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Karlheinz’s picture

Assigned: Unassigned » Karlheinz

  • Karlheinz committed 0596670 on 7.x-1.x
    Issue #2233207 by Karlheinz: timed out import of release generates empty...
Karlheinz’s picture

Status: Active » Needs review
FileSize
2.54 KB

I fixed this. It is committed to 7.x-1.x-dev, and I'm attaching a patch.

The details: Since the contract with the Provider says that the 'title' and 'release_artist' fields are required, it's the job of the Mediator to make sure that they are present before it even invokes the Entity Adapter. I foolishly didn't include code to check this in the Mediator before; now it does. The check happens during batch processing, so if one release fails, the importation process can keep going.