def __init__(
self,
object_id,
prefix="project",
namespace="collab",
collaborator_expiry=90,
online_event_kind=EventKind.PROJECTCOLLABORATORONLINE,
offline_event_kind=EventKind.PROJECTCOLLABORATOROFFLINE
):
"""
Creates an online collaborators manager
object_id: the object on which users are collaborating
"""
self.object_id = object_id
self.prefix = prefix
self.namespace = namespace
self.client = memcache.Client()
self.collaborator_expiry = datetime.timedelta(
seconds=collaborator_expiry)
self.online_event_kind = online_event_kind
self.offline_event_kind = offline_event_kind
评论列表
文章目录