alphagov / trade-tariff-backend

Enabling the population and distribution via API of UK Customs tariffs and duties
MIT License
7 stars 6 forks source link

better redis locks implementation #218

Closed vspy closed 9 years ago

vspy commented 9 years ago

This implementation constantly “bumps” lock expiry time while computations are being made. This should fix the situation when lock was mistakingly acquired by concurrent tasks because computations took more than a lock timeout. This supposedly lead to import task applying some updates twice, and maybe for continuing with updates application process after a fail (race condition).

matthewford commented 9 years ago

Looks good, I'll run a long rollback and hopefully this will help.