1
1
Fork 0

Merge pull request #6583 from annando/priority

Lower priority for removing items
This commit is contained in:
Hypolite Petovan 2019-02-03 19:37:16 -05:00 committed by GitHub
commit 5d2fce789a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -891,7 +891,7 @@ class User
Worker::add(PRIORITY_LOW, 'Directory', $self['url']);
// Remove the user relevant data
Worker::add(PRIORITY_LOW, 'RemoveUser', $uid);
Worker::add(PRIORITY_NEGLIGIBLE, 'RemoveUser', $uid);
return true;
}

View file

@ -24,7 +24,7 @@ class RemoveContact {
do {
$items = Item::select(['id'], $condition, ['limit' => 100]);
while ($item = Item::fetch($items)) {
DBA::delete('item', ['id' => $item['id']]);
Item::deleteById($item['id'], PRIORITY_NEGLIGIBLE);
}
DBA::close($items);
} while (Item::exists($condition));