feat: check status of repository

This commit is contained in:
tdurieux
2021-09-06 09:39:05 +02:00
parent 49da267d5f
commit cbbc43f280
3 changed files with 21 additions and 3 deletions

View File

@@ -93,7 +93,10 @@ export default class Repository {
* Check the status of the repository
*/
check() {
if (this._model.options.expirationMode !== "never") {
if (
this._model.options.expirationMode !== "never" &&
this._model.status == "ready"
) {
if (this._model.options.expirationDate <= new Date()) {
this.expire();
}