Closed fenix-hub closed 3 years ago
A snippet for the implementation:
var requests_queue : Array = [] func add(documentId : String, fields : Dictionary = {}): if request != REQUESTS.NONE: requests_queue.add([REQUESTS.ADD, documentId, fields]) return [...] func on_pusher_request_complete(...) : [...] check_queue() func check_queue(): if requests_queue.size() > 0: var first_request = requests_queue().pop_front() match first_request: REQUESTS.ADD: add(first_request[1], first_request[2])
note: this is a temporary solution. A proper scalable solution will be implemented by @WolfgangSenff
A snippet for the implementation:
note: this is a temporary solution. A proper scalable solution will be implemented by @WolfgangSenff