     startPublishingToRedis: () ->
         redis = require('redis')
         @redisClient = redis.createClient REDIS_PORT, REDIS_HOST,
-            max_attempts : 1
-        @redisClient.on "error", (err) ->
-            compound.logger.write "Failled to connect to redis : #{err.stack}"
-            compound.logger.write "Everything else should work as expected"
-        @redisClient.on "connect", ->
-            compound.logger.write "Begins publishing changes to redis"
+            max_attempts: 1
+        @redisClient.on "error", (err) =>
+            @app.compound.logger.write "Failled to connect to redis : #{err.stack}"
+            @app.compound.logger.write "Everything else should work as expected"
+        @redisClient.on "connect", =>
+            @app.compound.logger.write "Begins publishing changes to redis"
 
     publish: (event, id) => @_publish(event, id)
 

            else 'update'

            @db.get change.id, (err, doc) =>
                compound.logger.write err if err?
                doctype = doc?.docType?.toLowerCase()
                doctype ?= 'null'
                @_publish "#{doctype}.#{operation}", doc._id

        @feed = db.changes since:'now'
        @feed.on 'change', @_onChange
        @feed.on 'error', (err) =>
            @app.compound.logger.write "error occured with feed : #{err.stack}"
            @stopListening()

        @db = db
