Update static column name reference to use config setting

This commit is contained in:
Andrew Tomaka 2013-01-07 13:43:33 -05:00
parent b28b03b78e
commit 6b473b88c8

View file

@ -16,7 +16,7 @@ checkDate = moment().add('minutes', -5)
getDatabaseUpdates = () -> 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') + "'" 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) -> 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 checkDate = jobDate if jobDate > checkDate
updateClient job updateClient job