Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Instead of relying on 3rd party service, we could wrap them in bridge or expose through factory or facade
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
You can’t perform that action at this time.