mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-29 13:41:45 +02:00
Fix repository cleanup after removal and expiration (#782)
This commit is contained in:
@@ -543,6 +543,20 @@ export default class Repository {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Record that repository content has been cached again after a reset.
|
||||
*/
|
||||
async markCachePresent() {
|
||||
if (!this.model.isReseted) return;
|
||||
this.model.isReseted = false;
|
||||
if (isConnected) {
|
||||
await AnonymizedRepositoryModel.updateOne(
|
||||
{ _id: this._model._id },
|
||||
{ $set: { isReseted: false } }
|
||||
).exec();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the size of the repository in term of storage and number of files.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user