tomykaira/clockwork — pull request #119 by dougc84 (2014-08-28 19:20:47+00:00)
Title: Threads causing excessive database use

If an application has many different clock tasks, and they are scheduled to run on a fairly frequent basis (every minute or so), the database connection is lost very quickly, if threading is enabled globally (via `config[:thread] = true` or otherwise).

After some investigation, I found that, when starting a new thread, it creates a new database connection. If you do not close the connection to ActiveRecord (or any other ORM you may be using), you will have a zombie process on the database.

Setting this up for ActiveRecord only at this time because I am not aware of the syntaxes for other ORMs.