Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adicionar serviço agendado para remover itens(supplies) abaixo de urgente e registrar logs #157

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

luizpbello
Copy link

Criei um service com o schedule module do NestJS pra verificar a cada 48h itens dos abrigos(supplies), caso eles tenham sido criados ou atualizados a mais de 48 e não estejam com a prioridade de urgente, vão ser removidos.

Foi criada uma tabela SupplyAutoRemoveLog pra registrar os logs desse serviço.

@HbLuca HbLuca linked an issue May 20, 2024 that may be closed by this pull request
Copy link
Contributor

@rodrigooler rodrigooler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realizei uma revisão do código e identifiquei alguns pontos que podem ser aprimorados. Caso tenha alguma dúvida, sinta-se à vontade para me chamar no privado no Discord.

src/schedule/item-cleanup.service.ts Outdated Show resolved Hide resolved
src/schedule/item-cleanup.service.ts Outdated Show resolved Hide resolved
src/schedule/schedule.module.ts Outdated Show resolved Hide resolved
src/schedule/item-cleanup.service.ts Outdated Show resolved Hide resolved
@rodrigooler rodrigooler added the enhancement New feature or request label May 20, 2024
… abrigo não urgentes após 48 horas de inatividade. Implementada lógica de verificação de tempo decorrido com base em date-fns e utilização de transações do Prisma para garantir consistência de dados.
Copy link

@thiagodejesus thiagodejesus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examinando o código encontrei uma possível melhoria.

src/shelter-supply/shelter-supply-cleanup.service.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remoção de Itens Antigos
4 participants