Skip to content

Commit

Permalink
Have fixed delay during creating user
Browse files Browse the repository at this point in the history
  • Loading branch information
shishnk committed Apr 14, 2024
1 parent d2ca05a commit b009ed7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public async Task<IResponseMessage> Handle(CreatedUserIntegrationEvent @event)
var mediator = scope.ServiceProvider.GetRequiredService<IMediator>();
var result = await mediator.Send(new CreateUserCommand
{
TelegramId = @event.UserTelegramId, // TODO
TelegramId = @event.UserTelegramId,
Username = @event.Username,
MobileNumber = @event.MobileNumber,
RegisteredAt = @event.RegisteredAt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private Task HandleUpdateInnerAsync(ITelegramBotClient botClient, Update update,
try
{
await UpdateUsersCacheAsync(message, bus, cts.Token);
_ = UpdateUsersCacheAsync(message, bus, cts.Token);
var result = await _telegramCommandFactory.StartCommand(messageText, chatId);
if (result.IsFailed)
Expand Down
11 changes: 7 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ services:
condition: service_healthy
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8078
Expand All @@ -57,7 +59,8 @@ services:
test: [ "CMD-SHELL", "curl -f http://localhost:8078/health || exit 1" ]
interval: 5s
timeout: 10s
retries: 3
retries: 5
restart: on-failure
rabbitmq:
image: rabbitmq:3.13.0-management
healthcheck:
Expand All @@ -79,9 +82,9 @@ services:
- ~/data/postgres:/var/lib/postgresql/data/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 1s
timeout: 5s
retries: 3
interval: 5s
timeout: 10s
retries: 5
ports:
- "5755:5432"
redis:
Expand Down

0 comments on commit b009ed7

Please sign in to comment.