mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-02 11:16:41 +00:00
eliot changes
This commit is contained in:
parent
5b4f5e89e1
commit
c58dd36c87
@ -35,8 +35,10 @@ from allmydata.mutable.layout import get_version_from_checkstring,\
|
|||||||
MDMFSlotWriteProxy, \
|
MDMFSlotWriteProxy, \
|
||||||
SDMFSlotWriteProxy
|
SDMFSlotWriteProxy
|
||||||
|
|
||||||
import eliot
|
from eliot import (
|
||||||
|
Message,
|
||||||
|
start_action,
|
||||||
|
)
|
||||||
|
|
||||||
KiB = 1024
|
KiB = 1024
|
||||||
DEFAULT_MAX_SEGMENT_SIZE = 128 * KiB
|
DEFAULT_MAX_SEGMENT_SIZE = 128 * KiB
|
||||||
@ -959,7 +961,7 @@ class Publish(object):
|
|||||||
|
|
||||||
serverlist = []
|
serverlist = []
|
||||||
|
|
||||||
action = eliot.start_action(
|
action = start_action(
|
||||||
action_type=u"mutable:upload:update_goal",
|
action_type=u"mutable:upload:update_goal",
|
||||||
homeless_shares=len(homeless_shares),
|
homeless_shares=len(homeless_shares),
|
||||||
)
|
)
|
||||||
@ -967,17 +969,17 @@ class Publish(object):
|
|||||||
for i, server in enumerate(self.full_serverlist):
|
for i, server in enumerate(self.full_serverlist):
|
||||||
serverid = server.get_serverid()
|
serverid = server.get_serverid()
|
||||||
if server in self.bad_servers:
|
if server in self.bad_servers:
|
||||||
action.log(
|
Message.log(
|
||||||
|
message_type=u"mutable:upload:bad-server",
|
||||||
server_id=server.get_server_id(),
|
server_id=server.get_server_id(),
|
||||||
message="Server is bad",
|
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
# if we have >= 1 grid-managers, this checks that we have
|
# if we have >= 1 grid-managers, this checks that we have
|
||||||
# a valid certificate for this server
|
# a valid certificate for this server
|
||||||
if not server.upload_permitted():
|
if not server.upload_permitted():
|
||||||
action.log(
|
Message.log(
|
||||||
|
message_type=u"mutable:upload:no-gm-certs",
|
||||||
server_id=server.get_server_id(),
|
server_id=server.get_server_id(),
|
||||||
message="No valid grid-manager certificates",
|
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user