ckan / ckanext-archiver

Archive CKAN resources
MIT License
22 stars 46 forks source link

Race condition when resource URL is changed #6

Closed morty closed 10 years ago

morty commented 10 years ago

Because the notification come ultimately from the SQLAlchemy before_commit hook it is possible for the Celery task to get the old details out of the database.

To fix in this extension would require sending all of the information to the task rather than looking it up. But this would mean that if the task takes some time to be scheduled that the information might be out of date.

Better solution might be to fix CKAN so that it fires the notification on the after_commit hook.