comparison src/sync.coffee @ 17:a52b5b244e51

removed unnecessary underscore and replaced it with async
author Mathias Gebbe <mgebbe@intevation.de>
date Fri, 13 Jun 2014 15:18:36 +0200
parents 6fd0a307850f
children 6b3f38af3fa4
comparison
equal deleted inserted replaced
16:d2208a4ed5c8 17:a52b5b244e51
30 try 30 try
31 Usermap.scan ((user) -> 31 Usermap.scan ((user) ->
32 if user.id.indexOf('@facebook') isnt -1 32 if user.id.indexOf('@facebook') isnt -1
33 console.log "start sync for facebook user" 33 console.log "start sync for facebook user"
34 Facebook.sync(user) 34 Facebook.sync(user)
35 return
36 ), (err) -> 35 ), (err) ->
37 return
38 catch err 36 catch err
39 console.log 'Error!' 37 console.log 'Error!'
40 return
41 38
42 # Twitter 39 # Twitter
43 try 40 try
44 Usermap.scan ((user) -> 41 Usermap.scan ((user) ->
45 if user.id.indexOf('@twitter') isnt -1 42 if user.id.indexOf('@twitter') isnt -1
46 console.log "start sync for twitter user" 43 console.log "start sync for twitter user"
47 Twitter.sync(user) 44 Twitter.sync(user)
48 return
49 ), (err) -> 45 ), (err) ->
50 return
51 catch err 46 catch err
52 console.log 'Error!' 47 console.log 'Error!'
53 return
54 48
55 49
56 # Google 50 # Google
57 try 51 try
58 Usermap.scan ((user) -> 52 Usermap.scan ((user) ->
59 if user.id.indexOf('@google') isnt -1 53 if user.id.indexOf('@google') isnt -1
60 console.log "start sync for google user" 54 console.log "start sync for google user"
61 Google.sync(user) 55 Google.sync(user)
62 return
63 ), (err) -> 56 ), (err) ->
64 return
65 catch err 57 catch err
66 console.log 'Error!' 58 console.log 'Error!'
67 return
68 #### 59 ####
69 return 60 return
70 61
71 62
72 postParser = (post, user, network, callback) -> 63 postParser = (post, user, network, callback) ->
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)