Skip to content

kherkeladze/mutex-dynamodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynamodb-mutex

Installation :

npm install dynamodb-mutex

How to use

const mutex = require( 'dynamodb-mutex' );


let config = {
    region: 'REGION',
    accessKeyId: 'ACCESS_KEY_ID',
    accessKey: 'ACCESS_KEY',
    retryInterval: INTERVAL_TIME,
    tableName: 'TABLE_NAME'
};

let timeout = 2000;


const sampleMutex = new mutex(config);


sampleMutex.lock('keyName', timeout, (unlock) => {
  // DO AWESOME STUFF HERE
  unlock();
});


## License

MIT

About

Node.JS mutex implementation with DynamoDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published