@jacobbubu/meta-job-list
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@jacobbubu/meta-job-list

Build Status Coverage Status npm

Combine JobList and MergedModel to implement a JobList that cleans up jobs based on the number of how many peers been synced.

Intro.

I use a MergedModel to keep track of how many peers have synced for each job, so I can boldly delete the job.

MetaJobList is a class that combine a jobList and a mergedModel that used to store meta data.

CappedJobList is more like an example to show how to use MetaJobList. it shows how to set a sync threshold. When the number of peers synced to a job reaches this threshold, we delete the job and applyUpdate will not accept any further updates to the job.

Please use the example to understand how this logic works.

Readme

Keywords

none

Package Sidebar

Install

npm i @jacobbubu/meta-job-list

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

36.2 kB

Total Files

12

Last publish

Collaborators

  • jacobbubu