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:
committed by
Jiaqiang Xu
parent
b85d194b4b
commit
aa0185203b
@@ -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
|
||||
|
||||
|
@@ -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):
|
||||
|
Reference in New Issue
Block a user