Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/ai-music-system / lib/redis.js |
| Date | Not specified in source |
| Repository | Janady13/ai-music-system |
| Revision | 9a816470ef81edba7a5d8f3aae62c05eead638a7 |
| Branch | main |
| Path or archive member | lib/redis.js |
| Original SHA-256 | c24cfd16e46a4c763892304096a29ee686a18eae5cc15a0b09e210872eb00a2f |
| Git blob SHA | 9843931b3819413a2d964d25dbb1c19cd165d114 |
| Reading-copy SHA-256 | c24cfd16e46a4c763892304096a29ee686a18eae5cc15a0b09e210872eb00a2f |
Every recorded occurrence
These 3 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/ai-music-system / lib/redis.js | main | 9a816470ef81edba7a5d8f3aae62c05eead638a7 | Open original |
| Janady13/ai-music-system / lib/redis.js | codex/create-ai-for-music-generation-ifwcfc | cd5207850253ee238f8a267c043b1e3c070ed81a | Open original |
| Janady13/ai-music-system / lib/redis.js | codex/create-ai-for-music-generation | 017052c0e72c6175378aebb7a7f9dd96e82c3ce2 | Open original |
Recovered source transcript
Download complete source text ↓20 lines · 0.6 KB
const IORedis = require("ioredis");
function makeRedis() {
const url = process.env.REDIS_URL || "";
const opts = url ? url : {
host: process.env.REDIS_HOST || "127.0.0.1",
port: Number(process.env.REDIS_PORT || 6379),
};
const r = new IORedis(opts, {
retryStrategy: times => Math.min(times * 200, 10_000),
maxRetriesPerRequest: null,
enableReadyCheck: true,
});
r.on("error", e => console.error("redis error", e.message));
r.on("end", () => console.error("redis connection ended"));
return r;
}
module.exports = { makeRedis };