From 6b473b88c882540af5443b792b715dc01183e01a Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Mon, 7 Jan 2013 13:43:33 -0500 Subject: [PATCH] Update static column name reference to use config setting --- dbmonitor.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbmonitor.coffee b/dbmonitor.coffee index 494e864..1517663 100644 --- a/dbmonitor.coffee +++ b/dbmonitor.coffee @@ -16,7 +16,7 @@ checkDate = moment().add('minutes', -5) getDatabaseUpdates = () -> query = "SELECT " + application.timestamp_column + "," + application.columns.join(',') + " FROM " + application.table + " WHERE " + application.where + " AND " + application.timestamp_column + " > '" + checkDate.format('YYYY-MM-DD HH:mm:ss') + "'" db.query(query).addListener 'row', (job) -> - jobDate = moment(job.rec_time, 'YYYY-MM-DD HH:mm:ss') + jobDate = moment(job[application.timestamp_column], 'YYYY-MM-DD HH:mm:ss') checkDate = jobDate if jobDate > checkDate updateClient job