avoids users searches on backend, faster processing
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
fd42be531c
commit
847dfb0eb8
|
@ -319,7 +319,7 @@ class SyncService {
|
|||
|
||||
public function syncInstance(\Closure $progressCallback = null) {
|
||||
$systemAddressBook = $this->getLocalSystemAddressBook();
|
||||
$this->userManager->callForAllUsers(function($user) use ($systemAddressBook, $progressCallback) {
|
||||
$this->userManager->callForSeenUsers(function($user) use ($systemAddressBook, $progressCallback) {
|
||||
$this->updateUser($user);
|
||||
if (!is_null($progressCallback)) {
|
||||
$progressCallback();
|
||||
|
|
|
@ -92,7 +92,7 @@ class SyncBirthdayCalendar extends Command {
|
|||
$output->writeln("Start birthday calendar sync for all users ...");
|
||||
$p = new ProgressBar($output);
|
||||
$p->start();
|
||||
$this->userManager->callForAllUsers(function($user) use ($p) {
|
||||
$this->userManager->callForSeenUsers(function($user) use ($p) {
|
||||
$p->advance();
|
||||
|
||||
$userId = $user->getUID();
|
||||
|
|
|
@ -93,7 +93,7 @@ class BirthdayCalendarController extends Controller {
|
|||
$this->config->setAppValue($this->appName, 'generateBirthdayCalendar', 'yes');
|
||||
|
||||
// add background job for each user
|
||||
$this->userManager->callForAllUsers(function(IUser $user) {
|
||||
$this->userManager->callForSeenUsers(function(IUser $user) {
|
||||
$this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [
|
||||
'userId' => $user->getUID(),
|
||||
]);
|
||||
|
|
|
@ -72,7 +72,7 @@ class RegenerateBirthdayCalendars implements IRepairStep {
|
|||
}
|
||||
|
||||
$output->info('Adding background jobs to regenerate birthday calendar');
|
||||
$this->userManager->callForAllUsers(function(IUser $user) {
|
||||
$this->userManager->callForSeenUsers(function(IUser $user) {
|
||||
$this->jobList->add(GenerateBirthdayCalendarBackgroundJob::class, [
|
||||
'userId' => $user->getUID(),
|
||||
'purgeBeforeGenerating' => true
|
||||
|
|
Loading…
Reference in New Issue