     _.map deployments, (deployment) =>
       {beginTime, endTime} = deployment
 
+      elapsedTime = null
+      elapsedTime = endTime - beginTime if endTime?
+
       _.extend {}, deployment, {
-        elapsedTime: endTime - beginTime
+        elapsedTime: elapsedTime
         success: endTime?
       }
 

      host: @destinationElasticsearchUrl
      pathname: "/flow_start_history/event/#{deployment.deploymentUuid}"

    request.put uri, json: deployment, callback

  search: (body, callback=->) =>
    @sourceElasticsearch.search({

      deployments = @process @normalize result
      async.each deployments, @update, (error) =>
        throw error if error?
        process.exit 0

  update: (deployment, callback) =>
