 
   baseUri + member.lastName + member.firstName + assemblyId + ".jpg"
 
-persistMember = (session, member, db, callback) ->
+persistMember = (session, member, db, promise) ->
   assemblyIdForMember = member.Id
 
   memberDetails =

    upsert: true,
    safe: true
  , (err, doc) ->
    ifSuccessful err, callback, ->
      callback()

module.exports = (jobs, db) ->
  jobs.process 'import members', (job, callback) ->

            SessionId: session.assemblyId

          client.MemberService.BasicHttpBinding_MemberFinder.GetMembersBySession getMembersArgs, (err, result, raw) -> ifSuccessful err, callback, ->
            members = result.GetMembersBySessionResult.MemberListing

            promises = members.map (member) ->
              await('member').run (promise) ->
                persistMember(session, member, db, promise)

            await.all(promises).onkeep((got) -> callback()).onfail(() -> callback([].slice.call(arguments).join('\n')))
