MTG / freesound-datasets

A platform for the collaborative creation of open audio collections labeled by humans and based on Freesound content.
https://annotator.freesound.org/
GNU Affero General Public License v3.0
134 stars 12 forks source link

refresh_sound_deleted_state command does not handle failed requests #158

Open xavierfav opened 5 years ago

xavierfav commented 5 years ago

Currently we have a command that allows to check if sounds are deleted on Freesound, and update the database field in order to not show it to annotators.

The datasets refresh_sound_deleted_state command launches the task refresh_sound_deleted_state() from datasets/tasks.py. This command uses the Freesound API and does text search (query='') with filter on ID to retrieve pages of 50 sounds. If the request fails, it might assume that the sounds are deleted. The command should check the response type of the request, and maybe re-send the request, or just drop the command if after several tries.

I might be as simple as: