Remove debug logs and unused variables

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-04-19 11:06:15 +02:00
parent ec43f706c7
commit 33acc81f90
4 changed files with 4 additions and 13 deletions
@@ -97,7 +97,7 @@ export class CatalogProcessingOrchestratorImpl
async process(
request: EntityProcessingRequest,
): Promise<EntityProcessingResult> {
const { entity, eager, state } = request;
const { entity } = request;
const result = await this.processSingleEntity(entity);
@@ -269,7 +269,7 @@ export class NextCatalogBuilder {
parser,
policy,
});
const entitiesCatalog = new NextEntitiesCatalog(dbClient, logger);
const entitiesCatalog = new NextEntitiesCatalog(dbClient);
const locationStore = new LocationStoreImpl(db);
const dbLocationProvider = new DatabaseLocationProvider(locationStore);
@@ -14,17 +14,13 @@
* limitations under the License.
*/
import { Logger } from 'winston';
import { Knex } from 'knex';
import { DbFinalEntitiesRow } from './Stitcher';
import { EntitiesCatalog } from '../catalog';
import { EntitiesRequest, EntitiesResponse } from '../catalog/types';
export class NextEntitiesCatalog implements EntitiesCatalog {
constructor(
private readonly database: Knex,
private readonly logger: Logger,
) {}
constructor(private readonly database: Knex) {}
async entities(request?: EntitiesRequest): Promise<EntitiesResponse> {
if (request?.fields) {
+1 -6
View File
@@ -78,11 +78,7 @@ export class Stitcher {
)
.where({ target_entity_id: entity.metadata.uid })
.count({ reference_count: 'target_entity_id' });
console.log(
'DEBUG: reference_count_result =',
reference_count_result,
entityId,
);
if (Number(reference_count_result.reference_count) === 0) {
this.logger.debug(`${entityRef} is orphan`);
entity.metadata.annotations = {
@@ -103,7 +99,6 @@ export class Stitcher {
entity.metadata.generation = 1;
const etag = generateEntityEtag(entity);
entity.metadata.etag = etag;
console.log(JSON.stringify(entity, null, 2));
await tx<DbFinalEntitiesRow>('final_entities')
.insert({
finalized_entity: JSON.stringify(entity),