Skip to content

Commit

Permalink
fix: remove logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Saelmala committed Nov 12, 2024
1 parent 6e05584 commit c201fb8
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 169 deletions.
37 changes: 0 additions & 37 deletions src/api/ateliereLive/pipelines/renderingengine/renderingengine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,10 @@ export async function createPipelineHtmlSource(
width: Number(data.width)
};

Log().info('CREATE HTML SOURCE PAYLOAD', payload);

for (let i = 0; i < production.production_settings.pipelines.length; i++) {
Log().info(
'Request URL:',
`${LIVE_BASE_API_PATH}/pipelines/${production.production_settings.pipelines[i].pipeline_id}/renderingengine/html`
);
}

try {
const { production_settings } = production;

for (let i = 0; i < production_settings.pipelines.length; i++) {
Log().info(
'PIPELINE ID TO CREATE HTML SOURCE FOR: ',
production_settings.pipelines[i].pipeline_id
);
const response = await fetch(
new URL(
LIVE_BASE_API_PATH +
Expand All @@ -88,21 +75,16 @@ export async function createPipelineHtmlSource(
}
);
const text = await response.text();
Log().info('RESPONSE CREATE HTML: ', response);
Log().info('RESPONSE.TEXT CREATE HTML: ', text);
Log().info('RESPONSE.STATUS CREATE HTML: ', response.status);

if (response.status === 201) {
if (text.trim().length > 0) {
Log().warn('Unexpected content for 201 response:', text);
}
Log().info('SUCCESSFUL CREATION OF HTML SOURCE');
} else if (
response.status === 400 ||
response.status === 404 ||
response.status === 500
) {
Log().info('ERROR WHEN CREATING AN HTML SOURCE');
try {
const errorResponse = JSON.parse(text);
Log().error('API error response:', errorResponse);
Expand Down Expand Up @@ -308,7 +290,6 @@ export async function deleteHtmlFromPipeline(
}
}
);
Log().info('DELETE HTML RESPONSE', response);
if (response.ok) {
const text = await response.text();

Expand Down Expand Up @@ -354,23 +335,11 @@ export async function createPipelineMediaSource(
filename: data.filename,
input_slot: Number(inputSlot)
};
Log().info('PAYLOAD CREATE MEDIA', payload);

for (let i = 0; i < production.production_settings.pipelines.length; i++) {
Log().info(
'Request URL:',
`${LIVE_BASE_API_PATH}/pipelines/${production.production_settings.pipelines[i].pipeline_id}/renderingengine/media`
);
}

try {
const { production_settings } = production;

for (let i = 0; i < production_settings.pipelines.length; i++) {
Log().info(
'CREATING MEDIA FOR PIPELINE ID: ',
production_settings.pipelines[i].pipeline_id
);
const response = await fetch(
new URL(
LIVE_BASE_API_PATH +
Expand All @@ -386,17 +355,12 @@ export async function createPipelineMediaSource(
}
);
const text = await response.text();
Log().info('RESPONSE CREATE MEDIA: ', response);
Log().info('RESPONSE.TEXT CREATE MEDIA: ', text);
Log().info('RESPONSE.STATUS CREATE MEDIA: ', response.status);

if (response.status === 201) {
if (text.trim().length > 0) {
Log().warn('Unexpected content for 201 response:', text);
}
Log().info('SUCCESSFULLY CREATED MEDIA SOURCE');
} else if (response.status === 400 || response.status === 500) {
Log().info('ERROR WHEN CREATING A MEDIA SOURCE');
try {
const errorResponse = JSON.parse(text);
Log().error('API error response:', errorResponse);
Expand Down Expand Up @@ -585,7 +549,6 @@ export async function deleteMediaFromPipeline(
}
}
);
Log().info('DELETE MEDIA RESPONSE', response);
if (response.ok) {
const text = await response.text();

Expand Down
6 changes: 0 additions & 6 deletions src/api/manager/workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,6 @@ export async function stopProduction(
const htmlSources = await getPipelineRenderingEngineHtml(pipelineId);
const mediaSources = await getPipelineRenderingEngineMedia(pipelineId);

Log().info('GET RENDERING ENGINE HTML SOURCES: ', htmlSources);
Log().info('GET RENDERING ENGINE MEDIA SOURCES: ', mediaSources);

if (htmlSources.length > 0 && htmlSources) {
for (const pipeline of production.production_settings.pipelines) {
for (const htmlSource of htmlSources) {
Expand Down Expand Up @@ -805,9 +802,6 @@ export async function startProduction(
(source) => source.type === 'mediaplayer'
);

Log().info('HTML SOURCES IN START PRODUCTION: ', htmlSources);
Log().info('MEDIA SOURCES IN START PRODUCTION: ', mediaSources);

if (htmlSources.length > 0) {
for (const htmlSource of htmlSources) {
if (htmlSource.html_data) {
Expand Down
Loading

0 comments on commit c201fb8

Please sign in to comment.