FLOE-227: Improve pouchDBDataSource to queue requests

Metadata

Source
FLOE-227
Type
Improvement
Priority
Major
Status
Reopened
Resolution
N/A
Assignee
N/A
Reporter
Cindy Li
Created
2014-08-22T16:24:57.894-0400
Updated
2020-11-04T18:20:16.063-0500
Versions
N/A
Fixed Versions
N/A
Component
  1. Feedback Tool

Description

One issue with the asynchronous pouchDBDataSource set function is, if a "set" call was issued whilst the previous one is still outstanding, it would not be saved properly, only the data in the previous call would be saved.

As per discussions with Antranig in the IRC channel: https://botbot.me/freenode/fluid-work/2014-08-22/?tz=America/Havana, 11:10AM:

The callback from the set function can be listened to, whilst a save request was outstanding, we would not send another one.

A jQuery plugin that can potentially be used: https://github.com/cowboy/jquery-throttle-debounce

Comments