Registry / database / ewd-qoper8-redis

ewd-qoper8-redis

JSON →
library0.1.1jsnpmunverified

Integrates the Redis-based Global Storage database emulation (ewd-redis-globals) with ewd-qoper8 worker processes. Version 0.1.1 is the current and only release. This module simplifies setting up a Redis-backed Global Storage and DocumentStore inside ewd-qoper8 workers, automatically handling connection opening/closing and event wiring. It is designed for use with ewd-qoper8's worker event system. The package has not been updated since 2016 and is unmaintained, with limited documentation and no active development.

npm install ewd-qoper8-redis
INSTALL
IMPORT
SIG · EWD-QOPER8-REDIS
E
ewd-qoper8-redis
databasejavascriptv0.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ewd-qoper8-redis
const connectRedisTo = require('ewd-qoper8-redis');
import connectRedisTo from 'ewd-qoper8-redis'; // No ESM export
CommonJS-only, no default export. Must use require().
connectRedisTo
const connectRedisTo = require('ewd-qoper8-redis');
const { connectRedisTo } = require('ewd-qoper8-redis'); // Not a named export
The module exports a single function; destructuring will result in undefined.
dbOpened event
this.on('dbOpened', function(status) { ... });
this.on('dbOpened', status => { ... }); // Arrow function may not bind 'this' correctly in some contexts
Use regular function to preserve 'this' context inside the ewd-qoper8 worker.

Shows how to integrate ewd-qoper8-redis in an ewd-qoper8 worker by requiring the module in the 'start' event and handling dbOpened, dbClosed, and DocumentStoreStarted events.

// In your ewd-qoper8 worker module this.on('start', function(isFirst) { const connectRedisTo = require('ewd-qoper8-redis'); connectRedisTo(this); }); this.on('dbOpened', function(status) { console.log('Redis was opened by worker ' + process.pid + ': status = ' + JSON.stringify(status)); }); this.on('dbClosed', function() { console.log('Redis connection closed'); }); this.on('DocumentStoreStarted', function() { console.log('DocumentStore is ready'); });
Debug
Known issues
gotchaThe module must be used inside an ewd-qoper8 worker's 'start' event; it will not work outside of that context.
fix
Ensure require('ewd-qoper8-redis') is called only within the worker's 'start' event handler.
affects: >=0.0.0
gotchaThe module does not support ESM import syntax; only CommonJS require() works.
fix
Use const connectRedisTo = require('ewd-qoper8-redis'); instead of import.
affects: >=0.0.0
gotchaThe exported function is not a named export; destructuring will yield undefined.
fix
Assign the entire require result to a variable: const connectRedisTo = require('ewd-qoper8-redis');
affects: >=0.0.0
gotchaArrow functions used in event handlers may lose the correct 'this' context for the worker.
fix
Use regular function expressions (function() { ... }) in event handlers like 'dbOpened' and 'start'.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: connectRedisTo is not a function
Importing the module incorrectly (e.g., using import or destructuring)
fix
Use const connectRedisTo = require('ewd-qoper8-redis'); and call connectRedisTo(this);
Cannot find module 'ewd-qoper8-redis'
Module not installed or npm install failed
fix
Run 'npm install ewd-qoper8-redis' in your project directory.
dbOpened event not firing
The require call is placed outside the 'start' event handler, or Redis is not available.
fix
Ensure require('ewd-qoper8-redis') is inside the worker's 'start' event, and that Redis server is running on localhost:6379.
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
ewd-qoper8-redis — npm install ewd-qoper8-redis · libregistry