Commit 89254791 by Maiyannah Bishop

Moving queue stuff into /classes/queue/

1 parent 52083eb8
<?php
/* ============================================================================
* postActiv - a fork of the GNU Social microblogging software
* Title: DelUserQueueHandler
* Background job to delete prolific users without disrupting front-end too much.
*
* postActiv:
* the micro-blogging software
*
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2012, StatusNet, Inc
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......@@ -19,30 +27,54 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ----------------------------------------------------------------------------
* PHP version 5
*
* About:
* Background job to delete prolific users without disrupting front-end too much.
*
* Up to 50 messages are deleted on each run through; when all messages are gone,
* the actual account is deleted.
*
* #category Queue
* @package postActiv
* @author Brion Vibber <brion@pobox.com>
* @license https://www.gnu.org/licenses/agpl.html
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors:
* o Brion Vibber <brion@pobox.com>
* o Evan Prodromou
* o Mikael Nordfeldth <mmn@hethane.se>
* o Maiyannah Bishop <maiyannah.bishop@postactiv.com>
*
* Web:
* o postActiv <http://www.postactiv.com>
* o GNU social <https://www.gnu.org/s/social/>
* ============================================================================
*/
// This file is formatted so that it provides useful documentation output in
// NaturalDocs. Please be considerate of this before changing formatting.
if (!defined('POSTACTIV')) { exit(1); }
// ----------------------------------------------------------------------------
// Class: DelUserQueueHandler
// Class abstraction for the queue job of deleting a prolific user
//
// Defines:
// o DELETION_WINDOW - 50
class DelUserQueueHandler extends QueueHandler
{
const DELETION_WINDOW = 50;
// ------------------------------------------------------------------------
// Function: transport
public function transport()
{
return 'deluser';
}
// ------------------------------------------------------------------------
// Function: handle
//
// Parameters:
// o User $user
public function handle($user)
{
if (!($user instanceof User)) {
......@@ -95,10 +127,15 @@ class DelUserQueueHandler extends QueueHandler
return true;
}
/**
* Fetch the next self::DELETION_WINDOW messages for this user.
* @return Notice
*/
// ------------------------------------------------------------------------
// Function: getNextBatch
// Fetch the next self::DELETION_WINDOW messages for this user.
//
// Parameters:
// o User $user
//
// Returns:
// o Notice
protected function getNextBatch(User $user)
{
$notice = new Notice();
......
<?php
/* ============================================================================
* postActiv - a fork of the GNU Social microblogging software
* Title: DistribQueueHandler
* Transport that handles federation of notices.
*
* postActiv:
* the micro-blogging software
*
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2012, StatusNet, Inc
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......@@ -18,21 +26,10 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ----------------------------------------------------------------------------
* PHP version 5
*
* Base class for queue handlers.
*
* @category Queue
* @package postActiv
* @license https://www.gnu.org/licenses/agpl.html
*/
if (!defined('POSTACTIV')) { exit(1); }
/**
* Base class for queue handlers.
*
* <https://www.gnu.org/licenses/agpl.html>
* ----------------------------------------------------------------------------
* About:
* As extensions of the Daemon class, each queue handler has the ability
* to launch itself in the background, at which point it'll pass control
* to the configured QueueManager class to poll for updates.
......@@ -40,42 +37,65 @@ if (!defined('POSTACTIV')) { exit(1); }
* Subclasses must override at least the following methods:
* - transport
* - handle_notice
*
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors:
* o Evan Prodromou
* o Brion Vibber <brion@pobox.com>
* o Mikael Nordfeldth <mmn@hethane.se>
* o Maiyannah Bishop <maiyannah.bishop@postactiv.com>
*
* Web:
* o postActiv <http://www.postactiv.com>
* o GNU social <https://www.gnu.org/s/social/>
* ============================================================================
*/
// This file is formatted so that it provides useful documentation output in
// NaturalDocs. Please be considerate of this before changing formatting.
if (!defined('POSTACTIV')) { exit(1); }
class DistribQueueHandler
{
/**
* Return transport keyword which identifies items this queue handler
* services; must be defined for all subclasses.
*
* Must be 8 characters or less to fit in the queue_item database.
* ex "email", "jabber", "sms", "irc", ...
*
* @return string
*/
// ------------------------------------------------------------------------
// Function: transport
// Return transport keyword which identifies items this queue handler
// services; must be defined for all subclasses.
//
// Must be 8 characters or less to fit in the queue_item database.
// ex "email", "jabber", "sms", "irc", ...
//
// @return string
//
public function transport()
{
return 'distrib';
}
/**
* Handle distribution of a notice after we've saved it:
* @li add to local recipient inboxes
* @li send email notifications to local @-reply targets
* @li run final EndNoticeSave plugin events
* @li put any remaining post-processing into the queues
*
* If this function indicates failure, a warning will be logged
* and the item is placed back in the queue to be re-run.
*
* @param Notice $notice
* @return boolean true on success, false on failure
*/
// ------------------------------------------------------------------------
// Function: handle
//
// Handle distribution of a notice after we've saved it:
// o add to local recipient inboxes
// o send email notifications to local @-reply targets
// o run final EndNoticeSave plugin events
// o put any remaining post-processing into the queues
//
// If this function indicates failure, a warning will be logged
// and the item is placed back in the queue to be re-run.
//
// Parameters:
// o Notice $notice
//
// Returns:
// o boolean - true on success, false on failure
public function handle(Notice $notice)
{
// We have to manually add attentions to non-profile subs and non-mentions
$ptAtts = $notice->getAttentionsFromProfileTags();
$ptAtts = $notice->getAttentionsFromProfileTags();
foreach (array_keys($ptAtts) as $profile_id) {
$profile = Profile::getKV('id', $profile_id);
if ($profile instanceof Profile) {
......@@ -116,6 +136,9 @@ class DistribQueueHandler
return true;
}
// ------------------------------------------------------------------------
// Function: logit
// Log an exception we come across in handling federation
protected function logit($notice, $e)
{
common_log(LOG_ERR, "Distrib queue exception saving notice $notice->id: " .
......
<?php
/***
* postActiv - a fork of the GNU Social microblogging software
* Copyright (C) 2016, Maiyannah Bishop
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2011, StatusNet, Inc
/* ============================================================================
* Title: ImQueueHandles
* Common superclass for all IM sending queue handlers.
*
* PHP version 5
* postActiv:
* the micro-blogging software
*
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* Derived from code copyright various sources:
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......@@ -21,27 +27,52 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @license https://www.gnu.org/licenses/agpl.html
* <https://www.gnu.org/licenses/agpl.html>
* ----------------------------------------------------------------------------
* About:
* Common superclass for all IM sending queue handlers.
*
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors:
* o Craig Andrews <candrews@integralblue.com>
* o Mikael Nordfeldth <mmn@hethane.se>
* o Maiyannah Bishop <maiyannah.bishop@postactiv.com>
*
* Web:
* o postActiv <http://www.postactiv.com>
* o GNU social <https://www.gnu.org/s/social/>
* ============================================================================
*/
// This file is formatted so that it provides useful documentation output in
// NaturalDocs. Please be considerate of this before changing formatting.
if (!defined('POSTACTIV')) { exit(1); }
/**
* Common superclass for all IM sending queue handlers.
*/
// ----------------------------------------------------------------------------
// Class: ImQueueHandler
// Common superclass for all IM sending queue handlers.
class ImQueueHandler extends QueueHandler
{
// ------------------------------------------------------------------------
// Function: __construct
// Class constructor
function __construct($plugin)
{
$this->plugin = $plugin;
}
/**
* Handle a notice
* @param Notice $notice
* @return boolean success
*/
// ------------------------------------------------------------------------
// Function: handle
// Handle a notice
//
// Parameters:
// o Notice $notice
//
// Returns:
// o boolean success
function handle($notice)
{
$this->plugin->broadcastNotice($notice);
......@@ -51,4 +82,7 @@ class ImQueueHandler extends QueueHandler
return true;
}
}
// END OF FILE
// ============================================================================
?>
\ No newline at end of file
<?php
/***
* postActiv - a fork of the GNU Social microblogging software
* Copyright (C) 2016, Maiyannah Bishop
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2011, StatusNet, Inc
/* ============================================================================
* Title: ImReceiverQueueHandler
* Common superclass for all IM receiving queue handlers.
*
* PHP version 5
* postActiv:
* the micro-blogging software
*
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* Derived from code copyright various sources:
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......@@ -21,30 +27,59 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @license https://www.gnu.org/licenses/agpl.html
* <https://www.gnu.org/licenses/agpl.html>
* ----------------------------------------------------------------------------
* About:
* Common superclass for all IM receiving queue handlers.
*
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors:
* o Craig Andrews <candrews@integralblue.com>
* o Maiyannah Bishop <maiyannah.bishop@postactiv.com>
*
* Web:
* o postActiv <http://www.postactiv.com>
* o GNU social <https://www.gnu.org/s/social/>
* ============================================================================
*/
// This file is formatted so that it provides useful documentation output in
// NaturalDocs. Please be considerate of this before changing formatting.
if (!defined('POSTACTIV')) { exit(1); }
/**
* Common superclass for all IM receiving queue handlers.
*/
// ----------------------------------------------------------------------------
// Class: ImReceiverQueueHandler
// Common superclass for all IM receiving queue handlers.
class ImReceiverQueueHandler extends QueueHandler
{
function __construct($plugin)
{
$this->plugin = $plugin;
}
// -------------------------------------------------------------------------
// Function: __construct
// Class constructor
//
// Parameters:
// o Plugin $plugin - the IM plugin this handler is operating for
function __construct($plugin)
{
$this->plugin = $plugin;
}
/**
* Handle incoming IM data sent by a user to the IM bot
* @param object $data
* @return boolean success
*/
function handle($data)
{
return $this->plugin->receiveRawMessage($data);
}
// ------------------------------------------------------------------------
// Function: handle
// Handle incoming IM data sent by a user to the IM bot
//
// Parameters:
// o object $data
//
// Returns:
// o boolean success
function handle($data)
{
return $this->plugin->receiveRawMessage($data);
}
}
// END OF FILE
// ============================================================================
?>
\ No newline at end of file
<?php
/***
* postActiv - a fork of the GNU Social microblogging software
* Copyright (C) 2016, Maiyannah Bishop
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2011, StatusNet, Inc
*
/* ============================================================================
* Title: ImSenderQueueHandler
* Common superclass for all IM sending queue handlers.
*
* PHP version 5
* postActiv:
* the micro-blogging software
*
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* Derived from code copyright various sources:
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......@@ -23,26 +27,55 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @license https://www.gnu.org/licenses/agpl.html
* <https://www.gnu.org/licenses/agpl.html>
* ----------------------------------------------------------------------------
* About:
* Common superclass for all IM sending queue handlers.
*
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors:
* o Craig Andrews <candrews@integralblue.com>
* o Maiyannah Bishop <maiyannah.bishop@postactiv.com>
*
* Web:
* o postActiv <http://www.postactiv.com>
* o GNU social <https://www.gnu.org/s/social/>
* ============================================================================
*/
// This file is formatted so that it provides useful documentation output in
// NaturalDocs. Please be considerate of this before changing formatting.
if (!defined('POSTACTIV')) { exit(1); }
// ----------------------------------------------------------------------------
// Class: ImSenderQueueHandler
class ImSenderQueueHandler extends QueueHandler
{
function __construct($plugin)
{
$this->plugin = $plugin;
}
// -------------------------------------------------------------------------
// Function: __construct
function __construct($plugin)
{
$this->plugin = $plugin;
}
/**
* Handle outgoing IM data to be sent from the bot to a user
* @param object $data
* @return boolean success
*/
// -------------------------------------------------------------------------
// Function: handle
// Handle outgoing IM data to be sent from the bot to a user
//
// Parameters:
// o object $data
//
// Returns:
// o boolean success
function handle($data)
{
return $this->plugin->imManager->send_raw_message($data);
}
}
// END OF FILE
// ============================================================================
?>
\ No newline at end of file
<?php
/***
* postActiv - a fork of the GNU Social microblogging software
* Copyright (C) 2016, Maiyannah Bishop <maiyannah@member.fsf.org>
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2011, StatusNet, Inc
/* ============================================================================
* Title: PingQueueManager
* Queue handler for pushing new notices to ping servers.
*
* postActiv:
* the micro-blogging software
*
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* Derived from code copyright various sources:
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......@@ -19,23 +27,45 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @license https://www.gnu.org/licenses/agpl.html
* <https://www.gnu.org/licenses/agpl.html>
* ----------------------------------------------------------------------------
* About:
* Queue handler for pushing new notices to ping servers.
*
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors:
* o Brion Vibber <brion@pobox.com>
* o Maiyannah Bishop <maiyannah.bishop@postactiv.com>
*
* Web:
* o postActiv <http://www.postactiv.com>
* o GNU social <https://www.gnu.org/s/social/>
* ============================================================================
*/
// This file is formatted so that it provides useful documentation output in
// NaturalDocs. Please be considerate of this before changing formatting.
if (!defined('POSTACTIV')) { exit(1); }
/**
* Queue handler for pushing new notices to ping servers.
*/
// ----------------------------------------------------------------------------
// Class: PingQueueHandler
// Queue handler for pushing new notices to ping servers.
class PingQueueHandler extends QueueHandler {
// Function: transport
function transport() {
return 'ping';
}
function transport() {
return 'ping';
}
function handle($notice) {
require_once INSTALLDIR . '/lib/ping.php';
return ping_broadcast_notice($notice);
}
// Function: handle
function handle($notice) {
require_once INSTALLDIR . '/lib/ping.php';
return ping_broadcast_notice($notice);
}
}
// END OF FILE
// ----------------------------------------------------------------------------
?>
\ No newline at end of file
<?php
/***
* postActiv - a fork of the GNU Social microblogging software
* Copyright (C) 2016, Maiyannah Bishop <maiyannah@member.fsf.org>
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2011, StatusNet, Inc
/* ============================================================================
* Title: Plugin Queue Handler
* Queue handler for letting plugins handle stuff.
*
* postActiv:
* the micro-blogging software
*
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* Derived from code copyright various sources:
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......@@ -19,12 +27,9 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @license https://www.gnu.org/licenses/agpl.html
*/
if (!defined('POSTACTIV')) { exit(1); }
/**
* <https://www.gnu.org/licenses/agpl.html>
* ----------------------------------------------------------------------------
* About:
* Queue handler for letting plugins handle stuff.
*
* The plugin queue handler accepts notices over the "plugin" queue
......@@ -37,24 +42,64 @@ if (!defined('POSTACTIV')) { exit(1); }
* Fancier plugins may wish to instead hook the 'GetQueueHandlerClass'
* event with their own class, in which case they must ensure that
* their notices get enqueued when they need them.
*
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors:
* o Brion Vibber <brion@pobox.com>
* o Evan Prodromou
* o Mikael Nordfeldth <mmn@hethane.se>
* o Maiyannah Bishop <maiyannah.bishop@postactiv.com>
*
* Web:
* o postActiv <http://www.postactiv.com>
* o GNU social <https://www.gnu.org/s/social/>
* ============================================================================
*/
// This file is formatted so that it provides useful documentation output in
// NaturalDocs. Please be considerate of this before changing formatting.
if (!defined('POSTACTIV')) { exit(1); }
// ----------------------------------------------------------------------------
// Function: PluginQueueHandler
// Queue handler for letting plugins handle stuff.
//
// The plugin queue handler accepts notices over the "plugin" queue
// and simply passes them through the "HandleQueuedNotice" event.
//
// This gives plugins a chance to do background processing without
// actually registering their own queue and ensuring that things
// are queued into it.
//
// Fancier plugins may wish to instead hook the 'GetQueueHandlerClass'
// event with their own class, in which case they must ensure that
// their notices get enqueued when they need them.
class PluginQueueHandler extends QueueHandler
{
function transport()
{
return 'plugin';
}
// -------------------------------------------------------------------------
// Function: transport
function transport()
{
return 'plugin';
}
function handle($notice)
{
try {
Event::handle('HandleQueuedNotice', array(&$notice));
} catch (NoProfileException $unp) {
// We can't do anything about this, so just skip
return true;
}
return true;
}
// -------------------------------------------------------------------------
// Function: handle
function handle($notice)
{
try {
Event::handle('HandleQueuedNotice', array(&$notice));
} catch (NoProfileException $unp) {
// We can't do anything about this, so just skip
return true;
}
return true;
}
}
// END OF FILE
// ============================================================================
?>
\ No newline at end of file
<?php
/***
* postActiv - a fork of the GNU Social microblogging software
* Copyright (C) 2016, Maiyannah Bishop <maiyannah@member.fsf.org>
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2011, StatusNet, Inc
/* ============================================================================
* Title: QueueHandler
* Base class for queue handlers.
*
* postActiv:
* the micro-blogging software
*
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* Derived from code copyright various sources:
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
......@@ -19,12 +27,9 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @license https://www.gnu.org/licenses/agpl.html
*/
if (!defined('POSTACTIV')) { exit(1); }
/**
* <https://www.gnu.org/licenses/agpl.html>
* ----------------------------------------------------------------------------
* About:
* Base class for queue handlers.
*
* As of 0.9, queue handlers are short-lived for items as they are
......@@ -37,20 +42,57 @@ if (!defined('POSTACTIV')) { exit(1); }
* Subclasses must override at least the following methods:
* - transport
* - handle
*
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors:
* o Neil E. Hodges <47hasbegun@gmail.com>
* o Maiyannah Bishop <maiyannah.bishop@postactiv.com>
*
* File Copyright:
* o 2016 Neil E. Hodges
*
* Web:
* o postActiv <http://www.postactiv.com>
* o GNU social <https://www.gnu.org/s/social/>
* ============================================================================
*/
// This file is formatted so that it provides useful documentation output in
// NaturalDocs. Please be considerate of this before changing formatting.
if (!defined('POSTACTIV')) { exit(1); }
// ----------------------------------------------------------------------------
// Function: QueueHandler
// Base class for queue handlers.
//
// As of 0.9, queue handlers are short-lived for items as they are
// dequeued by a QueueManager running in an IoMaster in a daemon
// such as queuedaemon.php.
//
// Extensions requiring long-running maintenance or polling should
// register an IoManager.
//
// Subclasses must override at least the following methods:
// - transport
// - handle
class QueueHandler
{
/**
* Here's the meat of your queue handler -- you're handed a Notice
* or other object, which you may do as you will with.
*
* If this function indicates failure, a warning will be logged
* and the item is placed back in the queue to be re-run.
*
* @param mixed $object
* @return boolean true on success, false on failure
*/
// -------------------------------------------------------------------------
// Function: handle
// Here's the meat of your queue handler -- you're handed a Notice
// or other object, which you may do as you will with.
//
// If this function indicates failure, a warning will be logged
// and the item is placed back in the queue to be re-run.
//
// Parameters:
// o mixed $object
//
// Returns:
// o boolean true on success, false on failure
function handle($object)
{
return true;
......
<?php
/***
* postActiv - a fork of the GNU Social microblogging software
* Copyright (C) 2016, Maiyannah Bishop <maiyannah@member.fsf.org>
* Derived from code copyright various sources:
* GNU Social (C) 2013-2016, Free Software Foundation, Inc
* StatusNet (C) 2008-2011, StatusNet, Inc
/* ============================================================================
* Title: QueueMonitor
* Base class for Queue monitors
*
* Monitoring output helper for IoMaster and IoManager/QueueManager
* postActiv:
* the micro-blogging software
*
* PHP version 5
* Copyright:
* Copyright (C) 2016, Maiyannah Bishop
*
* LICENCE: This program is free software: you can redistribute it and/or modify
* Derived from code copyright various sources:
* o GNU Social (C) 2013-2016, Free Software Foundation, Inc
* o StatusNet (C) 2008-2012, StatusNet, Inc
* ----------------------------------------------------------------------------
* License:
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
......@@ -23,38 +27,58 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category QueueManager
* @package StatusNet
* @author Brion Vibber <brion@status.net>
* @copyright 2010 StatusNet, Inc.
* @license https://www.gnu.org/licenses/agpl.html
* @link http://status.net/
* <https://www.gnu.org/licenses/agpl.html>
* ----------------------------------------------------------------------------
* About:
* Monitoring output helper for IoMaster and IoManager/QueueManager
*
* PHP version:
* Tested with PHP 5.6
* ----------------------------------------------------------------------------
* File Authors: