mirror of
https://github.com/n08i40k/schedule-parser-next.git
synced 2025-12-06 09:47:46 +03:00
2.0.1
Фикс уведомлений при обновлении расписания и хеширования кеша.
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "schedule-parser-next",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "schedule-parser-next",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@nestjs/cache-manager": "^2.2.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "schedule-parser-next",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "",
|
||||
"author": "N08I40K",
|
||||
"private": true,
|
||||
|
||||
@@ -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