Script sometimes sends random data to database?

I use the rufus-scheduler to execute jobs within my Rails application. I
have the following code: http://pastie.org/652937
This is run every ~10 min. The database is mySQL, just in case it
matters.

The data that gets skewed / screwed up is “score_keeper”.
As far as I can tell, what I wrote should do this:
At the end of the script, either create a row for today if it doesn’t
exist, or update the row for today with the integers that were built up
as the script goes, with a value of 0 or more.

I’ll come in the morning sometimes and see that both dictated and
proofread have values of ~144 or more in the database, which makes no
sense because I know there haven’t been that many dictated or proofread
since the beginning of the day. Sometimes it’s 220. I don’t understand
where it gets these values from.

Any ideas?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs