verida / data-connector-server

1 stars 2 forks source link

Consider returning early when responding to `/sync` #111

Closed aurelticot closed 1 month ago

aurelticot commented 1 month ago

Calling the /sync endpoint triggers the connection syncing. This operation can take several minutes.

The request currently hangs until the operation is finished to respond to the caller.

Consider triggering the sync operation without waiting for it to finish and return a 200 or 204.

To get informed of the end of the sync, the idea is to listen to the connections status via an event source (or directly the Verida record in the short-term).

tahpot commented 1 month ago

Added a instantComplete option to /sync and /sync/:connectionId.