amzn / oss-dashboard

A dashboard for viewing many GitHub organizations at once.
Apache License 2.0
159 stars 40 forks source link

Fix to update same daily-traffic-data entry #114

Closed ysknmt closed 7 years ago

ysknmt commented 7 years ago

*Issue #, if available: N/A

*Description of changes: Per executing, data for the two weeks is added to the traffic_views_daily and traffic_clones_daily table even if data of the same org/repo/timestamp already exists. For this reason, there were multiple duplicated data in that tables.

If data of the same org, repo, timestamp exist before adding data, delete it and add new one, so that duplication of entries is avoided.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

hyandell commented 7 years ago

Thank you Yusuke :)