Commit dc413da3 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Fix paths

git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@24 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 2c0ef0c3
......@@ -3,8 +3,8 @@ import errno
import logging
from select import select
from protocol import Packet, ProtocolError
from event import IdleEvent
from neo.protocol import Packet, ProtocolError
from neo.event import IdleEvent
class BaseConnection(object):
"""A base connection."""
......
import logging
from protocol import Packet, ProtocolError
from connection import ServerConnection
from neo.protocol import Packet, ProtocolError
from neo.connection import ServerConnection
from protocol import ERROR, REQUEST_NODE_IDENTIFICATION, ACCEPT_NODE_IDENTIFICATION, \
PING, PONG, ASK_PRIMARY_MASTER, ANSWER_PRIMARY_MASTER, ANNOUNCE_PRIMARY_MASTER, \
......
......@@ -4,15 +4,15 @@ import os
from socket import inet_aton
from time import time
from connection import ConnectionManager
from config import ConfigurationManager
from protocol import Packet, ProtocolError, \
RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, BROKEN_STATE
from node import NodeManager, MasterNode, StorageNode, ClientNode
from handler import EventHandler
from event import EventManager
from util import dump
from neo.config import ConfigurationManager
from neo.protocol import Packet, ProtocolError, \
RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, BROKEN_STATE, \
INVALID_UUID, INVALID_OID, INVALID_TID
from neo.node import NodeManager, MasterNode, StorageNode, ClientNode
from neo.handler import EventHandler
from neo.event import EventManager
from neo.util import dump
from neo.connection import ListeningConnection
class NeoException(Exception): pass
class ElectionFailure(NeoException): pass
......@@ -408,7 +408,7 @@ class Application(object):
self.unconnected_master_node_set = set()
self.negotiating_master_node_set = set()
cm = self.cm
em = self.em
nm = self.nm
while 1:
t = 0
......@@ -422,7 +422,7 @@ class Application(object):
try:
while 1:
cm.poll(1)
em.poll(1)
current_time = time()
if current_time >= t + 1:
t = current_time
......
from time import time
from protocol import RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, BROKEN_STATE, \
from neo.protocol import RUNNING_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE, BROKEN_STATE, \
MASTER_NODE_TYPE, STORAGE_NODE_TYPE, CLIENT_NODE_TYPE
class Node(object):
......
......@@ -2,7 +2,7 @@ from struct import pack, unpack
from socket import inet_ntoa, inet_aton
import logging
from util import dump
from neo.util import dump
# The protocol version (major, minor).
PROTOCOL_VERSION = (4, 0)
......@@ -183,7 +183,7 @@ class Packet(object):
body = [pack('!L', len(node_list))]
for node_type, ip_address, port, uuid, state in node_list:
body.append(pack('!H4sH16sH', node_type, inet_aton(ip_address), port,
uuid, state)
uuid, state))
self._body = ''.join(body)
return self
......
......@@ -19,7 +19,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
from optparse import OptionParser
from master.app import Application
from neo.master.app import Application
import logging
......@@ -37,7 +37,7 @@ section = options.section or 'master'
if options.verbose:
logging.basicConfig(level = logging.DEBUG)
else:
logging.basicConfig(level = logging.ERROR)
logging.basicConfig(level = logging.WARNING)
app = Application(config, section)
app.run()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment