Merge remote-tracking branch 'upstream/2020.12-rc' into fork

This commit is contained in:
Michael 2021-01-03 10:06:17 +00:00
commit d70d180e4b
3 changed files with 14 additions and 7 deletions

View file

@ -35,6 +35,7 @@ Athalbert
aweiher aweiher
axelt axelt
balderino balderino
Balázs Úr
Beanow Beanow
beardyunixer beardyunixer
Beatriz Vital Beatriz Vital
@ -133,6 +134,7 @@ julia.domagalska
Julio Cova Julio Cova
Karel Karel
Karolina Karolina
Kastal András
Keenan Pepper Keenan Pepper
Keith Fernie Keith Fernie
Klaus Weidenbach Klaus Weidenbach
@ -144,11 +146,11 @@ Leberwurscht
Leonard Lausen Leonard Lausen
Lionel Triay Lionel Triay
loma-one loma-one
loma1
Lorem Ipsum Lorem Ipsum
Ludovic Grossard Ludovic Grossard
Lynn Stephenson Lynn Stephenson
maase2 maase2
Magdalena Gazda
Mai Anh Nguyen Mai Anh Nguyen
Manuel Pérez Monís Manuel Pérez Monís
Marcin Klessa Marcin Klessa
@ -157,7 +159,6 @@ Marcus Müller
Marie Olive Marie Olive
Mariusz Pisz Mariusz Pisz
marmor marmor
Marquis_de_Carabas
Martin Schmitt Martin Schmitt
Mateusz Mikos Mateusz Mikos
Mats Sjöberg Mats Sjöberg
@ -177,6 +178,7 @@ mpanhans
mytbk mytbk
nathilia-peirce nathilia-peirce
Nicola Spanti Nicola Spanti
nobody
Olaf Conradi Olaf Conradi
Oliver Oliver
Olivier Olivier
@ -225,7 +227,6 @@ Samuli Valavuo
Sandro Santilli Sandro Santilli
Sebastian Egbers Sebastian Egbers
sella sella
Sennewood
Seth Seth
Silke Meyer Silke Meyer
Simon L'nu Simon L'nu
@ -242,7 +243,6 @@ Sveinn í Felli
Sven Anders Sven Anders
Sylke Vicious Sylke Vicious
Sylvain Lagacé Sylvain Lagacé
szymon.filip
Sérgio Lima Sérgio Lima
Taekus Taekus
Tazman DeVille Tazman DeVille

View file

@ -417,6 +417,12 @@ class Worker
{ {
$a = DI::app(); $a = DI::app();
$cooldown = DI::config()->get("system", "worker_cooldown", 0);
if ($cooldown > 0) {
Logger::info('Pre execution cooldown.', ['priority' => $queue["priority"], 'id' => $queue["id"], 'cooldown' => $cooldown]);
sleep($cooldown);
}
Logger::enableWorker($funcname); Logger::enableWorker($funcname);
Logger::info("Process start.", ['priority' => $queue["priority"], 'id' => $queue["id"]]); Logger::info("Process start.", ['priority' => $queue["priority"], 'id' => $queue["id"]]);
@ -489,10 +495,8 @@ class Worker
DI::profiler()->saveLog(DI::logger(), "ID " . $queue["id"] . ": " . $funcname); DI::profiler()->saveLog(DI::logger(), "ID " . $queue["id"] . ": " . $funcname);
$cooldown = DI::config()->get("system", "worker_cooldown", 0);
if ($cooldown > 0) { if ($cooldown > 0) {
Logger::info('Cooldown.', ['priority' => $queue["priority"], 'id' => $queue["id"], 'cooldown' => $cooldown]); Logger::info('Post execution cooldown.', ['priority' => $queue["priority"], 'id' => $queue["id"], 'cooldown' => $cooldown]);
sleep($cooldown); sleep($cooldown);
} }
} }

View file

@ -1159,6 +1159,9 @@ class User
return false; return false;
} }
// Delete the avatar
Photo::delete(['uid' => $register['uid']]);
return DBA::delete('user', ['uid' => $register['uid']]) && return DBA::delete('user', ['uid' => $register['uid']]) &&
Register::deleteByHash($register['hash']); Register::deleteByHash($register['hash']);
} }