amitt001 / amitt001/pygmy

Link with an expiry time, shown as expired = False on dashboard even after expiry time

Aberta
#29 0 comentários 0 reações 0 responsáveis Ver no GitHub
bug enhancement
Linguagem predominante
Python
Estrelas
728
Forks
141
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

The pygmy application offers an option to create links that expire after some specific time. This works by attaching an expiry time(in minutes), which is a positive integer, to the link record in DB.

The expiry time of an URL is calculated by `url creation time + expiry time` and if it is less than the current time, the short link is considered expired and can't be used anymore. If a user is logged in, the dashboard will show this URL as either expired = True or False, depending on weather url was opened after it's expiry time or not. This is where the bug lies.

The reason why the dashboard doesn't have real-time knowledge about the state of URL is, the expiry value in DB is set if a call comes for URL after it has expired. There is no background job for marking the URL as expired.

**How this issue can be fixed?**
This can be fixed by checking the expiry of URL on the application level when building the response data for the dashboard. URL's can be marked as expired at this point and any subsequent call to dashboard doesn't need to make any more updates.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.