Skip to content

Instantly share code, notes, and snippets.

@shaitan
Last active December 26, 2015 07:39
Show Gist options
  • Save shaitan/7116266 to your computer and use it in GitHub Desktop.
Save shaitan/7116266 to your computer and use it in GitHub Desktop.
Logger, config & node initialization.
import elliptics
log = elliptics.Logger("/dev/stderr", 31)
cfg = elliptics.Config()
cfg.cookie = "0123456789012345678901234567890123456789"
cfg.config.wait_timeout = 60
cfg.config.check_timeout = 60
n = elliptics.Node(log, cfg)
try:
n.add_remote("localhost", 1025)
except:
pass
try:
n.add_remote("localhost", 1026, 2)
except:
pass
try:
n.add_remote("some_host:1040:10")
except:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment