alphagov/trade-tariff-backend — pull request #6 by sauliusg (2012-08-17 11:45:24+00:00)
Title: Tariff synchronizer clean

This update adds update synchronisation functionality.

There are two involved tasks:

tariff:sync:download - downloads all pending updates for Taric and Chief. Pending means older than currently present updates in data/* folder or older than TariffSynchronizer.taric_initial_date (chief_initial_date).

tariff:sync:apply - apply all pending updates in data/inbox and data/failbox. All failed updates go to data/failbox and admin gets email notification. Errors used to be fixed by hand, so it will probably continue on this note.

Bunch of new environment variables were added like: SYNC_HOST, SYNC_USER, SYNC_PASSWORD and SYNC_EMAIL. These has to be set in puppet.

Also, it now uses cron to do perform its tasks. This will also require modificaiton on deploy.rb. But this should wait until Chief is done, otherwise it may throw errors.