-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: keep notification and heartbeat records when import backup with … #3000
fix: keep notification and heartbeat records when import backup with … #3000
Conversation
Is this PR has any problem there?,should I cancel it? |
What you implemented is not only a fix (which there was already a PR open), but also a breaking change to the behavior of overwrite mode without previous discussion. |
monitorsIdList = monitorsIdList.map((item) => { | ||
return item.id; | ||
}); | ||
log.info("manage", "Import Backup with 'overwrite mode. now remove the monitors which is not in backup json'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.info("manage", "Import Backup with 'overwrite mode. now remove the monitors which is not in backup json'"); | |
log.info("manage", "Import Backup with 'overwrite mode'. Now remove the monitors which is not in backup JSON'"); |
monitorsIdList.splice(idx, 1); | ||
} | ||
} | ||
log.info("manage", `Need OverWrite Monitors Id List:[${needOverWriteMonitorsIdList}],Length:${needOverWriteMonitorsIdList.length}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.info("manage", `Need OverWrite Monitors Id List:[${needOverWriteMonitorsIdList}],Length:${needOverWriteMonitorsIdList.length}`); | |
log.info("manage", `Need OverWrite Monitors Id List: [${needOverWriteMonitorsIdList}], Length:${needOverWriteMonitorsIdList.length}`); |
// delete old same monitor item with expired id | ||
await R.exec("DELETE FROM monitor where id= ? ", monitorListData[i].id); | ||
} else { | ||
log.info("manage", `[BackUp OverWrite Mode] Find new monitor Join - name:${monitorListData[i].name}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.info("manage", `[BackUp OverWrite Mode] Find new monitor Join - name:${monitorListData[i].name}`); | |
log.info("manage", `[BackUp OverWrite Mode] Find new monitor Join - name: ${monitorListData[i].name}`); |
Obsolete as the backup feature has been dropped in #3892. |
…overwrite mode
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Fixes #677
Type of change
Please delete any options that are not relevant.
Checklist
(including JSDoc for methods)
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.