mirror of
https://github.com/n08i40k/schedule-parser-next.git
synced 2025-12-06 17:57:45 +03:00
2.0.1
Фикс уведомлений при обновлении расписания и хеширования кеша.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user