{"id":41618,"library":"node-red-contrib-semaphore","title":"node-red-contrib-semaphore","description":"A Node-RED node that provides semaphore functionality to limit concurrent access to resources. Version 1.0.1 is the current stable release. The package is simple and focused, offering two nodes: 'semaphore take' and 'semaphore leave'. It queues messages on a semaphore with configurable capacity. No frequent updates; maintained for basic needs. Differentiator: native Node-RED integration for flow control and resource limiting.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/teastman/node-red-contrib-semaphore","tags":["javascript","node-red","semaphore"],"install":[{"cmd":"npm install node-red-contrib-semaphore","lang":"bash","label":"npm"},{"cmd":"yarn add node-red-contrib-semaphore","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-red-contrib-semaphore","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core semaphore logic","package":"semaphore","optional":false}],"imports":[{"note":"Node-RED nodes are loaded by the runtime, not imported directly in scripts.","wrong":"Direct require in custom JavaScript code","symbol":"Node-RED node","correct":"Install via npm in Node-RED directory and use nodes in flows"},{"note":"Configuration is done via Node-RED UI, not via code.","wrong":"No code import needed","symbol":"semaphore node configuration","correct":"Set capacity in node properties or via msg.capacity"},{"note":"Node-RED nodes cannot be imported; they are instantiated by the editor.","wrong":"Trying to require('node-red-contrib-semaphore') in function node","symbol":"Using semaphore in Node-RED function node","correct":"Access context or use flow control as designed"}],"quickstart":{"code":"# Install in Node-RED directory\ncd ~/.node-red\nnpm install node-red-contrib-semaphore\n# Restart Node-RED\n# Then in flow editor add 'semaphore take' node (configure name and capacity)\n# Connect to nodes that need limited concurrency\n# Add 'semaphore leave' node after processing to release","lang":"javascript","description":"Install and use semaphore nodes to limit concurrent execution in Node-RED flows."},"warnings":[{"fix":"Implement error handling with Catch node that triggers a semaphore leave","message":"Deadlock if leave node not called on error; use catch node to ensure leave is called","severity":"gotcha","affected_versions":"all"},{"fix":"Design flows to be tolerant of restart or use persistent context","message":"Semaphore state is lost on Node-RED restart; semaphore capacity resets to default","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure semaphore names are unique or intended to share","message":"Multiple take nodes can be connected to same semaphore by same name; they share capacity","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.0.1':22 'access':18 'basic':56 'capac':50 'concurr':17 'configur':49 'contrib':4 'control':66 'current':25 'differenti':58 'flow':65 'focus':33 'frequent':52 'function':14 'integr':63 'javascript':70 'leav':41 'limit':16,69 'maintain':54 'messag':44 'nativ':59 'need':57 'node':2,8,10,36,61,72 'node-r':7,60,71 'node-red-contrib-semaphor':1 'offer':34 'packag':29 'provid':12 'queue':43 'red':3,9,62,73 'releas':27 'resourc':20,68 'semaphor':5,13,37,40,47,74 'simpl':31 'stabl':26 'take':38 'two':35 'updat':53 'version':21","created_at":"2026-06-04T18:53:16.694970+00:00","updated_at":"2026-06-04T18:53:16.694970+00:00","problems":[{"fix":"Run 'npm install' in Node-RED directory or install globally with --save","cause":"Missing semaphore dependency due to incomplete npm install","error":"Error: Cannot find module 'semaphore'"},{"fix":"Add error handling with Catch node to call leave on error","cause":"Leave node not triggered; perhaps due to error in flow","error":"semaphore leave not freeing slot"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/teastman/node-red-contrib-semaphore#readme","github":"https://github.com/teastman/node-red-contrib-semaphore","docs":null,"changelog":null,"pypi":null,"npm":"node-red-contrib-semaphore","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}