Skip to content

Commit

Permalink
feat: Improve logging by adding logging interceptor to API Gateway an…
Browse files Browse the repository at this point in the history
…d SourceController latest
  • Loading branch information
monzim committed Jul 1, 2024
1 parent c4d5f83 commit 9741d38
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api_gateway/src/logging.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class LoggingInterceptor implements NestInterceptor {
.pipe(
tap(() =>
this.logger.log(
`${context.switchToHttp().getResponse().statusCode} ${context.switchToHttp().getRequest().method} ${Date.now() - now}ms -${context.switchToHttp().getRequest().url} ${context.getClass().name}.${context.getHandler().name}`,
`${context.switchToHttp().getResponse().statusCode} | ${context.switchToHttp().getRequest().method} ${Date.now() - now}ms -${context.switchToHttp().getRequest().url} | ${context.getClass().name}.${context.getHandler().name}`,
),
),
);
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/(protected)/console/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export default async function Page() {
</div>
<p className="text-muted-foreground mt-5">
Here all the data sources where you want to save your sync data. You
can click on the data source to see all the data and sync it.
can click on the data source to see all the data and sync it. (Sync
happens every 30 minutes)
</p>
</section>

Expand Down
2 changes: 1 addition & 1 deletion sync_service/src/tasks/tasks.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class TasksService {
private readonly prisma: PrismaService,
) {}

@Cron(CronExpression.EVERY_10_MINUTES)
@Cron(CronExpression.EVERY_30_MINUTES)
async autoSyncPerHour() {
this.logger.log('Schedule sync started');
const users = await this.prisma.users.findMany({
Expand Down

0 comments on commit 9741d38

Please sign in to comment.