Daily Upload Failing

0 votes

For the last 2 days the smartform-updater has been failing due to the following error:

$ /home/ubuntu/bin/smartform-updater all-feeds
Fetching data from: https://www.betwise.co.uk/smartform_data/...private key (not shown here).../daily_updates.sql
Fetching data from: https://www.betwise.co.uk/smartform_data/...private key (not shown here).../daily_updates_beta.sql
Fetching data from: https://www.betwise.co.uk/smartform_data/...private key (not shown here)..../daily_betfair_mappings.sql
could not execute SQL statement: Error 1062: Duplicate entry '988087-2090585' for key 'PRIMARY'

I'm not really sure what is causing this error since the individual updates seem to work.

asked Dec 19, 2020 by PunterBot Handicapper (830 points)
edited Dec 19, 2020 by colin

1 Answer

0 votes
 
Best answer

Hi - thanks for the question, this raises some important points:

1.  The updater is not failing.  Since in this example you are running "all feeds", as in smartform-updater-all-feeds there will be an error shown if any one of the individual feeds you are subscribed to fails to update your local database for any reason. 

2.  In this particular case, the daily_betfair_mappings feed is failing to update - per the highlighted error you have shown.  All the other feeds work fine.

3.  The reason for this particular error is that sometimes we have to correct the betfair daily mappings on an intraday basis, after they have already gone out.  This usually occurs if, for whatever reason, the Betfair API has failed.  The first fix to try in these instances is to delete the last day of betfair mappings that you have in your local database and try the updater again.  (delete from daily_betfair_mappings where date=max(date)) The brute force approach is simply to re-install all the historic data for daily_betfair_mappings (ie. re-install the table), which will also delete the errant day and install correct days - meaning future updates will also go through fine.

Any issues let us know.

(PS: I also edited your question to remove your BW private license key which was shown in your original post but should not be shared.)

answered Dec 19, 2020 by colin Frankel (19,280 points)
selected Dec 20, 2020 by PunterBot
Great thanks, it worked.
...