mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Remove RealTimeService and ALERT_PORT
This commit is contained in:
@@ -60,11 +60,6 @@ export const ClusterKey: ObjectID = new ObjectID(
|
||||
|
||||
export const HasClusterKey: boolean = Boolean(process.env['ONEUPTIME_SECRET']);
|
||||
|
||||
export const RealtimeHostname: Hostname = Hostname.fromString(
|
||||
`${process.env['SERVER_REALTIME_HOSTNAME'] || 'localhost'}:${
|
||||
process.env['REALTIME_PORT'] || 80
|
||||
}`
|
||||
);
|
||||
|
||||
export const WorkerHostname: Hostname = Hostname.fromString(
|
||||
`${process.env['SERVER_WORKERS_HOSTNAME'] || 'localhost'}:${
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
import API from 'Common/Utils/API';
|
||||
import { RealtimeHostname, ClusterKey } from '../EnvironmentConfig';
|
||||
import DatabaseConfig from '../DatabaseConfig';
|
||||
import { JSONObjectOrArray } from 'Common/Types/JSON';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import Headers from 'Common/Types/API/Headers';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import HTTPResponse from 'Common/Types/API/HTTPResponse';
|
||||
import EmptyResponse from 'Common/Types/API/EmptyResponse';
|
||||
import Protocol from 'Common/Types/API/Protocol';
|
||||
|
||||
class Service {
|
||||
private api: API | null = null;
|
||||
private headers: Headers;
|
||||
|
||||
public constructor() {
|
||||
this.headers = {
|
||||
ONEUPTIME_SECRET: ClusterKey.toString(),
|
||||
};
|
||||
}
|
||||
|
||||
public async send(
|
||||
projectId: ObjectID,
|
||||
eventType: string,
|
||||
data: JSONObjectOrArray
|
||||
): Promise<HTTPResponse<EmptyResponse>> {
|
||||
const httpProtocol: Protocol = await DatabaseConfig.getHttpProtocol();
|
||||
this.api = new API(httpProtocol, RealtimeHostname);
|
||||
|
||||
return await this.api.post<EmptyResponse>(
|
||||
new Route(`/send-created-incident`),
|
||||
{
|
||||
projectId,
|
||||
eventType,
|
||||
data,
|
||||
},
|
||||
this.headers
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default new Service();
|
||||
@@ -48,16 +48,12 @@
|
||||
value: {{ $.Values.port.app | squote }}
|
||||
- name: WORKFLOW_PORT
|
||||
value: {{ $.Values.port.workflow | squote }}
|
||||
- name: ALERT_PORT
|
||||
value: {{ $.Values.port.alert | squote }}
|
||||
- name: INGESTOR_PORT
|
||||
value: {{ $.Values.port.ingestor | squote }}
|
||||
- name: PROBE_PORT
|
||||
value: {{ $.Values.port.probe | squote }}
|
||||
- name: TEST_SERVER_PORT
|
||||
value: {{ $.Values.port.testServer | squote }}
|
||||
- name: REALTIME_PORT
|
||||
value: {{ $.Values.port.realtime | squote }}
|
||||
- name: WORKERS_PORT
|
||||
value: {{ $.Values.port.workers | squote }}
|
||||
- name: ACCOUNTS_PORT
|
||||
|
||||
@@ -94,11 +94,9 @@ SERVER_OTEL_COLLECTOR_HOSTNAME=otel-collector
|
||||
|
||||
APP_PORT=3002
|
||||
WORKFLOW_PORT=3099
|
||||
ALERT_PORT=3088
|
||||
INGESTOR_PORT=3400
|
||||
PROBE_PORT=3500
|
||||
TEST_SERVER_PORT=3800
|
||||
REALTIME_PORT=3300
|
||||
WORKERS_PORT=3452
|
||||
ACCOUNTS_PORT=3003
|
||||
STATUS_PAGE_PORT=3105
|
||||
|
||||
@@ -33,11 +33,9 @@ x-common-variables: &common-variables
|
||||
#Ports. Usually they don't need to change.
|
||||
APP_PORT: ${APP_PORT}
|
||||
WORKFLOW_PORT: ${WORKFLOW_PORT}
|
||||
ALERT_PORT: ${ALERT_PORT}
|
||||
INGESTOR_PORT: ${INGESTOR_PORT}
|
||||
PROBE_PORT: ${PROBE_PORT}
|
||||
TEST_SERVER_PORT: ${TEST_SERVER_PORT}
|
||||
REALTIME_PORT: ${REALTIME_PORT}
|
||||
WORKERS_PORT: ${WORKERS_PORT}
|
||||
ACCOUNTS_PORT: ${ACCOUNTS_PORT}
|
||||
STATUS_PAGE_PORT: ${STATUS_PAGE_PORT}
|
||||
|
||||
Reference in New Issue
Block a user