Created
September 21, 2013 05:48
-
-
Save we4tech/6647596 to your computer and use it in GitHub Desktop.
Instead of relying on 3rd party service, we could wrap them in bridge or expose through factory or facade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle_action_created(action) | |
if action.from.kind_of?(Source) | |
$redis.lpush( | |
"#{self.class.name}:#{self.id}", | |
[action.from.node.id, action.from.node.neo_id].join(":") | |
) | |
end | |
end | |
# Perhaps we could do | |
def handle_action_created(action) | |
if action.from.kind_of?(Source) | |
RedisService.addJob( | |
"#{self.class.name}:#{self.id}", | |
[action.from.node.id, action.from.node.neo_id]) | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment