diff src/google.coffee @ 27:f27ddfa42e94

try/catch; From/To/-ESN changes; google probs
author Mathias Gebbe <mgebbe@intevation.de>
date Sat, 28 Jun 2014 13:08:40 +0200
parents cdbc77880565
children faeb3b96bdeb
line wrap: on
line diff
--- a/src/google.coffee	Tue Jun 24 08:32:51 2014 +0200
+++ b/src/google.coffee	Sat Jun 28 13:08:40 2014 +0200
@@ -52,16 +52,18 @@
           async.eachLimit stream.items, 10, ((post, cb) ->
             async.waterfall [
               (callback) ->
-                console.log "check googlepost "+ post.id
+                console.log "check googlepost " + post.id + " to " +  me
                 FromESN.search {uid: post.id + "@google_to_" + me}, callback
               (result, callback) ->
-                return if result.length isnt 0
-                ti = new Date().getTime() - interval
-                ts = Date.parse(post.published)
-                if (ts >= ti)
+                if result.length isnt 0
+                  return
+                else
                   Sync.postParser post, null, 'google', callback
-                else
-                  return
+                #ti = new Date().getTime() - interval
+                #ts = Date.parse(post.published)
+                #if (ts >= ti)
+                #else
+                #  return
               (parsed, callback) ->
                 console.log "post googlepost "+ post.id
                 Pump.postUser bridgeid, me, parsed, callback
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)