Link with an expiry time, shown as expired = False on dashboard even after expiry time
- Ngôn ngữ chính
- Python
- Star
- 728
- Fork
- 141
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.