mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
fix redis auth
This commit is contained in:
parent
195cd4aab4
commit
0ea65787f5
@ -1,7 +1,7 @@
|
||||
import { Queue as BullQueue, JobsOptions, Job } from 'bullmq';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import { RedisHostname, RedisPort } from '../Config';
|
||||
import { RedisHostname, RedisPassword, RedisPort } from '../Config';
|
||||
|
||||
export enum QueueName {
|
||||
Workflow = 'Workflow',
|
||||
@ -15,6 +15,7 @@ export default class Queue {
|
||||
connection: {
|
||||
host: RedisHostname.toString(),
|
||||
port: RedisPort.toNumber(),
|
||||
password: RedisPassword
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Worker } from 'bullmq';
|
||||
import { RedisHostname, RedisPort } from '../Config';
|
||||
import { RedisHostname, RedisPassword, RedisPort } from '../Config';
|
||||
import { QueueJob, QueueName } from './Queue';
|
||||
|
||||
export default class QueueWorker {
|
||||
@ -12,6 +12,7 @@ export default class QueueWorker {
|
||||
connection: {
|
||||
host: RedisHostname.toString(),
|
||||
port: RedisPort.toNumber(),
|
||||
password: RedisPassword
|
||||
},
|
||||
concurrency: options.concurrency,
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import ComponentMetadata, { Port } from 'Common/Types/Workflow/Component';
|
||||
import ComponentID from 'Common/Types/Workflow/ComponentID';
|
||||
import WebhookComponents from 'Common/Types/Workflow/Components/Webhook';
|
||||
import LogComponents from 'Common/Types/Workflow/Components/Log';
|
||||
import ComponentCode, { RunReturnType } from '../ComponentCode';
|
||||
|
||||
export default class Log extends ComponentCode {
|
||||
@ -11,7 +11,7 @@ export default class Log extends ComponentCode {
|
||||
super();
|
||||
|
||||
const LogComponent: ComponentMetadata | undefined =
|
||||
WebhookComponents.find((i: ComponentMetadata) => {
|
||||
LogComponents.find((i: ComponentMetadata) => {
|
||||
return i.id === ComponentID.Log;
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,7 @@ import BadDataException from 'Common/Types/Exception/BadDataException';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import ComponentMetadata from 'Common/Types/Workflow/Component';
|
||||
import ComponentID from 'Common/Types/Workflow/ComponentID';
|
||||
import WebhookComponents from 'Common/Types/Workflow/Components/Webhook';
|
||||
import ScheduleComponents from 'Common/Types/Workflow/Components/Schedule';
|
||||
import Workflow from 'Model/Models/Workflow';
|
||||
import WorkflowService from '../../../Services/WorkflowService';
|
||||
import QueryHelper from '../../Database/QueryHelper';
|
||||
@ -14,7 +14,7 @@ import ComponentCode, {
|
||||
|
||||
export default class WebhookTrigger extends ComponentCode {
|
||||
public constructor() {
|
||||
const component: ComponentMetadata | undefined = WebhookComponents.find(
|
||||
const component: ComponentMetadata | undefined = ScheduleComponents.find(
|
||||
(i: ComponentMetadata) => {
|
||||
return i.id === ComponentID.Schedule;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ const APP_NAME: string = 'workflow';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
app.use(`/`, new ComponentCode().router);
|
||||
|
||||
app.use(`/manual`, new ManualAPI().router);
|
||||
|
||||
// Job process.
|
||||
@ -40,6 +40,8 @@ const init: Function = async (): Promise<void> => {
|
||||
PostgresAppInstance.getDatasourceOptions()
|
||||
);
|
||||
|
||||
app.use(`/`, new ComponentCode().router);
|
||||
|
||||
// connect redis
|
||||
await Redis.connect();
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user