Skip to content

sp3c1/jenkins-locks-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Info

Helpers to achieve throttling. Outstanding locks are cleared on every valid index.js (lock or release). Mongo schema got TTL o 10 minutes. Lock name is unique.

attempt.js

SO you want a lock from pipline. Invoke the node attempt.js -l lockname -t 2000. Default -t is 2 minutes. It will hang for 10 minutes, trying to get the lock. Exit with 0 when locked, 1 when failed.

index.js

So you want to release? Invoke the node attempt.js -l lockname. Will free the lock.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published