fix(routes+ui): capture route bin optional, jobs Redis URL, recorders S3_REGION+stop codes, api.js full rewrite, upload.html multipart fix, capture.html bin guard: jobs.js
This commit is contained in:
parent
f9c680cc22
commit
e796a0d15f
1 changed files with 10 additions and 4 deletions
|
|
@ -9,11 +9,17 @@ const router = express.Router();
|
|||
router.use(requireAuth);
|
||||
|
||||
// Initialize BullMQ queue for conform jobs
|
||||
const parseRedisUrl = (url) => {
|
||||
try {
|
||||
const parsed = new URL(url);
|
||||
return { host: parsed.hostname, port: parseInt(parsed.port, 10) || 6379 };
|
||||
} catch {
|
||||
return { host: 'localhost', port: 6379 };
|
||||
}
|
||||
};
|
||||
|
||||
const conformQueue = new Queue('conform', {
|
||||
connection: {
|
||||
host: process.env.REDIS_HOST || 'localhost',
|
||||
port: process.env.REDIS_PORT || 6379,
|
||||
},
|
||||
connection: parseRedisUrl(process.env.REDIS_URL || 'redis://queue:6379'),
|
||||
});
|
||||
|
||||
// GET / - List jobs
|
||||
|
|
|
|||
Loading…
Reference in a new issue