backup --no-create-db

This commit is contained in:
xiaomlove
2022-04-09 21:41:30 +08:00
parent 52edfa1d87
commit b7c1102500
3 changed files with 10 additions and 11 deletions

View File

@@ -128,13 +128,7 @@ class TrackerRepository extends BaseRepository
do_log("[" . get_class($exception) . "] " . $exception->getMessage() . "\n" . $exception->getTraceAsString(), 'error');
$repDict = $this->generateFailedAnnounceResponse("system error, report to sysop please, hint: " . nexus()->getRequestId());
} finally {
$setUpdate = "[USER_SET_UPDATE] user: " . $user->id;
foreach ($this->userUpdates as $key => $value) {
$setUpdate .= ", $key = $value";
}
do_log($setUpdate);
if (isset($user) && count($this->userUpdates)) {
// $user->update($this->userUpdates);
$user->fill($this->userUpdates);
$willBeUpdate = "[USER_ACTUAL_UPDATE] user: " . $user->id;
foreach ($user->getDirty() as $key => $value) {
@@ -862,10 +856,15 @@ class TrackerRepository extends BaseRepository
do_log("[" . get_class($exception) . "] " . $exception->getMessage() . "\n" . $exception->getTraceAsString(), 'error');
$repDict = $this->generateFailedAnnounceResponse("system error, report to sysop please, hint: " . nexus()->getRequestId());
} finally {
do_log("userUpdates: " . nexus_json_encode($this->userUpdates));
if (isset($user) && count($this->userUpdates)) {
$user->update($this->userUpdates);
do_log(last_query(), 'debug');
$user->fill($this->userUpdates);
$willBeUpdate = "[USER_ACTUAL_UPDATE] user: " . $user->id;
foreach ($user->getDirty() as $key => $value) {
$willBeUpdate .= ", $key = $value";
}
do_log($willBeUpdate);
$user->save();
do_log(last_query());
}
return $this->sendFinalAnnounceResponse($repDict);
}