resurfaceio / logger-nodejs

Log API calls with Node.js
Apache License 2.0
16 stars 2 forks source link

#24 Background submission with Axios and queue #30

Closed monrax closed 2 years ago

monrax commented 3 years ago

Http/https requests are now made using Axios. Both options skip_compression and skip_submission are now read in the constructor, and the _url_options structure is recomputed inside skip_compression's setter. The Async package doesn't offer a bounded queue; async.queue can be configured to limit the concurrency (# of "parallel" workers), but not its depth. This functionality is achieved by counting the number of submissions, using a callback to change the value accordingly. The "blocking" behavior is achieved by taking advantage of the Promise-based nature of Axios.

Anyesh commented 2 years ago

@monrax could you please fix the conflicts in this PR and we can extend this for the batch submission. Thanks!

Anyesh commented 2 years ago

9ccfc95f8b24e3b74909cfe2fcb938707c6e714c

monrax commented 2 years ago

Thank you @Anyesh. This closes issue #24