Фикс уведомлений при обновлении расписания и хеширования кеша.
This commit is contained in:
2024-10-21 00:50:12 +04:00
parent 39ba88105f
commit ab15fdc136
4 changed files with 6 additions and 8 deletions

View File

@@ -201,8 +201,6 @@ export class V1ScheduleService {
const dom = await this.getDOM(siteMainPageDto.mainPage);
const url = this.parseData(dom);
console.log(url);
return await this.updateDownloadUrl(url);
}

View File

@@ -77,11 +77,11 @@ export class V2ScheduleService {
this.cacheUpdatedAt = new Date();
const oldHash = this.cacheHash;
this.cacheHash = objectHash.sha1(schedule.groups);
this.cacheHash = objectHash.sha1(schedule.etag);
if (this.cacheHash !== oldHash) {
if (this.scheduleUpdatedAt.valueOf() !== 0 && !silent) {
await this.v1ScheduleService.refreshCache(true);
if (this.scheduleUpdatedAt.valueOf() !== 0) {
if (!silent) await this.v1ScheduleService.refreshCache(true);
const isReplaced = await this.scheduleReplacerService.hasByEtag(
schedule.etag,