1
0
Fork 0

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
1 changed files with 1 additions and 1 deletions

View File

@ -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