ruuvi / ruuvitracker_server

RuuviTracker Server
https://ruuvi.com
BSD 2-Clause "Simplified" License
22 stars 8 forks source link

At start of session, it is possible that adding events fails #50

Closed jsyrjala closed 12 years ago

jsyrjala commented 12 years ago

Adding events may fail if several events are added fast. First event creates new event_session row, but second event also tries to create new row and fails due to database constraints.

-> Retry once if creating event_session row fails.

http://stackoverflow.com/questions/1879885/clojure-how-to-to-recur-upon-exception