mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 03:14:19 +00:00
fix socketio emits from database event listeners
This commit is contained in:
parent
9c9de242ca
commit
e269156925
@ -43,7 +43,7 @@ def resource_after_delete(mapper, connection, resource):
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
room = f'/users/{resource.user_hashid}'
|
room = f'/users/{resource.user_hashid}'
|
||||||
socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
|
socketio.emit('patch_user', jsonpatch, room=room)
|
||||||
|
|
||||||
|
|
||||||
def cfa_after_delete(mapper, connection, cfa):
|
def cfa_after_delete(mapper, connection, cfa):
|
||||||
@ -55,7 +55,7 @@ def cfa_after_delete(mapper, connection, cfa):
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
room = f'/users/{cfa.corpus.user.hashid}'
|
room = f'/users/{cfa.corpus.user.hashid}'
|
||||||
socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
|
socketio.emit('patch_user', jsonpatch, room=room)
|
||||||
|
|
||||||
|
|
||||||
def resource_after_insert(mapper, connection, resource):
|
def resource_after_insert(mapper, connection, resource):
|
||||||
@ -70,7 +70,7 @@ def resource_after_insert(mapper, connection, resource):
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
room = f'/users/{resource.user_hashid}'
|
room = f'/users/{resource.user_hashid}'
|
||||||
socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
|
socketio.emit('patch_user', jsonpatch, room=room)
|
||||||
|
|
||||||
|
|
||||||
def cfa_after_insert(mapper, connection, cfa):
|
def cfa_after_insert(mapper, connection, cfa):
|
||||||
@ -84,7 +84,7 @@ def cfa_after_insert(mapper, connection, cfa):
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
room = f'/users/{cfa.corpus.user.hashid}'
|
room = f'/users/{cfa.corpus.user.hashid}'
|
||||||
socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
|
socketio.emit('patch_user', jsonpatch, room=room)
|
||||||
|
|
||||||
|
|
||||||
def resource_after_update(mapper, connection, resource):
|
def resource_after_update(mapper, connection, resource):
|
||||||
@ -110,7 +110,7 @@ def resource_after_update(mapper, connection, resource):
|
|||||||
)
|
)
|
||||||
if jsonpatch:
|
if jsonpatch:
|
||||||
room = f'/users/{resource.user_hashid}'
|
room = f'/users/{resource.user_hashid}'
|
||||||
socketio.emit('patch_user', jsonpatch, namespace='/users', room=room)
|
socketio.emit('patch_user', jsonpatch, room=room)
|
||||||
|
|
||||||
|
|
||||||
def job_after_update(mapper, connection, job):
|
def job_after_update(mapper, connection, job):
|
||||||
|
Loading…
Reference in New Issue
Block a user