 
 constructTaskLogObject = (calculatorUserID, messageIdentifierString, callback) ->
   taskLogObject = new TaskLog
+    "createdAt": new Date()
     "calculator":calculatorUserID
     "sentDate": Date.now()
     "messageIdentifierString":messageIdentifierString

  taskLogObject.sessions = taskObject.sessions
  taskLogObject.save (err) -> callback err

  winston.info "Game successfully simulated in #{taskObject.calculationTimeMS}, logging result"


updateScores = (taskObject,callback) ->


      taskLogJSON = taskLog.toObject()

      #return errors.badInput res, "That computational task has already been performed" if taskLogJSON.calculationTimeMS
      #return handleTimedOutTask req, res, clientResponseObject if hasTaskTimedOut taskLogJSON.sentDate

      logTaskComputation clientResponseObject, taskLog, (loggingError) ->
        return errors.serverError res, "There as a problem logging the task computation: #{loggingError}" if loggingError?
        updateScores clientResponseObject, (updatingScoresError, newScores) ->
          return errors.serverError res, "There was an error updating the scores.#{updatingScoresError}" if updatingScoresError?
          sendResponseObject req, res, newScores
