Classes: RequestScheduler

RequestScheduler

If enabled (on local or development builds) will schedule incoming request to allow for specific requests to run in isolation (without any other request being handled simultaneously). This is useful for debugMode, where we want to only capture error and debug logs related to this request from stdout en stderror.


new RequestScheduler()

Source:

Methods


flushQueue()

Whenever a locked request finishes, will flush everything from the queue and call handleRequest on them

Source:

scheduleRequest(callback [, isolate])

Handles an incoming request.

Parameters:
Name Type Argument Default Description
callback function

A callback to handle a request which returns a Promise that resolves or rejects when the request is complete

isolate boolean <optional>
false

If true, will execute the request in isolation (while no other requests are running).

Source: