mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-12-23 02:00:17 +00:00
Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
674249ccfc
commit
366fbbd3e1
1 changed files with 4 additions and 6 deletions
|
@ -439,10 +439,9 @@ function mailstream_html_wrap(&$text)
|
|||
*/
|
||||
function mailstream_convert_table_entries()
|
||||
{
|
||||
$ms_item_ids = DBA::selectToArray('mailstream_item', ['message-id', 'uri', 'uid', 'contact-id'], ["`mailstream_item`.`completed` IS NULL"]);
|
||||
if (DBA::isResult($ms_item_ids)) {
|
||||
Logger::debug('mailstream_convert_table_entries processing ' . count($ms_item_ids) . ' items');
|
||||
foreach ($ms_item_ids as $ms_item_id) {
|
||||
$ms_item_ids = DBA::selectToArray('mailstream_item', [], ['message-id', 'uri', 'uid', 'contact-id'], ["`mailstream_item`.`completed` IS NULL"]);
|
||||
Logger::debug('mailstream_convert_table_entries processing ' . count($ms_item_ids) . ' items');
|
||||
foreach ($ms_item_ids as $ms_item_id) {
|
||||
$send_hook_data = array('uid' => $ms_item_id['uid'],
|
||||
'contact-id' => $ms_item_id['contact-id'],
|
||||
'uri' => $ms_item_id['uri'],
|
||||
|
@ -454,8 +453,7 @@ function mailstream_convert_table_entries()
|
|||
continue;
|
||||
}
|
||||
Logger::info('mailstream_convert_table_entries: convert item to workerqueue', $send_hook_data);
|
||||
Hook::fork(PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data);
|
||||
}
|
||||
Hook::fork(PRIORITY_LOW, 'mailstream_send_hook', $send_hook_data);
|
||||
}
|
||||
DBA::e('DROP TABLE `mailstream_item`');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue