1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-08-31 15:11:08 +00:00

add rpc publish_event() , pop_event() and remove cevent (#253)

This commit is contained in:
Xiangyue Cai
2019-07-22 11:18:32 +08:00
committed by Jiaqiang Xu
parent b85d194b4b
commit aa0185203b
13 changed files with 208 additions and 90 deletions

View File

@@ -789,3 +789,13 @@ class SeafServerThreadedRpcClient(NamedPipeClient):
@searpc_func("int", ["string"])
def cancel_copy_task(task_id):
pass
# event
@searpc_func("int", ["string", "string"])
def publish_event(channel, content):
pass
@searpc_func("string", ["string"])
def pop_event(channel):
pass

View File

@@ -827,6 +827,12 @@ class SeafileAPI(object):
def convert_repo_path(self, repo_id, path, user, is_org=False):
return seafserv_threaded_rpc.convert_repo_path(repo_id, path, user, 1 if is_org else 0)
def publish_event(self, channel, content):
return seafserv_threaded_rpc.publish_event(channel, content)
def pop_event(self, channel):
return seafserv_threaded_rpc.pop_event(channel)
seafile_api = SeafileAPI()
class CcnetAPI(object):