[CORE] Better queues defaults

Esse commit está contido em:
Diogo Cordeiro
2019-12-11 02:20:54 +00:00
commit 60446dfc20
12 arquivos alterados com 68 adições e 61 exclusões
@@ -228,7 +228,7 @@ sending out SMS email or XMPP messages, for off-line processing. See
* `enabled` (boolean, default false): Whether to uses queues.
* `daemon` (boolean, default false): Wather to use queuedaemon. False means
* `daemon` (boolean, default false): Whether to use queuedaemon. False means
you'll use OpportunisticQM plugin.
* `subsystem` (enum["db", "stomp"], default 'db'): Which kind of queueserver to
+1 -1
Ver Arquivo
@@ -356,6 +356,7 @@ $default =
'LRDD' => [],
'Nodeinfo' => [],
'OpenID' => [],
'DBQueue' => [],
'OpportunisticQM' => [],
'RemoteFollow' => [],
'ActivityPub' => [], // The order is important here (IT HAS TO COME BEFORE OSTATUS)
@@ -363,7 +364,6 @@ $default =
'Poll' => [],
'SimpleCaptcha' => [],
'TagSub' => [],
'UnQueue' => [],
'WebFinger' => [],
],
'locale_path' => false, // Set to a path to use *instead of* each plugin's own locale subdirectories
+10 -7
Ver Arquivo
@@ -27,7 +27,7 @@ defined('GNUSOCIAL') || die();
class DBQueuePlugin extends Plugin
{
const PLUGIN_VERSION = '0.0.1';
const PLUGIN_VERSION = '0.1.0';
public function onStartNewQueueManager(?QueueManager &$qm)
{
@@ -38,12 +38,15 @@ class DBQueuePlugin extends Plugin
public function onPluginVersion(array &$versions): bool
{
$versions[] = array('name' => 'DBQueue',
'version' => self::PLUGIN_VERSION,
'author' => 'Miguel Dantas',
'description' =>
// TRANS: Plugin description.
_m('Plugin using the database as a backend for GNU social queues'));
$versions[] = [
'name' => 'DBQueue',
'version' => self::PLUGIN_VERSION,
'author' => 'Miguel Dantas',
'homepage' => GNUSOCIAL_ENGINE_URL,
'description' =>
// TRANS: Plugin description.
_m('Plugin using the database as a backend for GNU social queues')
];
return true;
}
};
@@ -4,9 +4,7 @@ that uses the database as it's backing storage.
Installation
============
This plugin is replaces other queue manager plugins, such as UnQueue,
which enabled by default and which should, but is not required to be
disabled.
This plugin is enabled by default and replaces other queue manager plugins, such as UnQueue.
addPlugin('DBQueue');
@@ -15,4 +13,4 @@ Example
In config.php
addPlugin('DBQueue');
addPlugin('DBQueue');
+10 -8
Ver Arquivo
@@ -34,7 +34,7 @@ use Predis\PredisException;
class RedisCachePlugin extends Plugin
{
const PLUGIN_VERSION = '0.0.1';
const PLUGIN_VERSION = '0.1.0';
// settings which can be set in config.php with addPlugin('Embed', ['param'=>'value', ...]);
public $server = null;
@@ -133,13 +133,15 @@ class RedisCachePlugin extends Plugin
public function onPluginVersion(array &$versions): bool
{
$versions[] = array('name' => 'RedisCache',
'version' => self::VERSION,
'author' => 'chimo',
'homepage' => 'https://github.com/chimo/gs-rediscache',
'description' =>
// TRANS: Plugin description.
_m('Plugin implementing Redis as a backend for GNU social caching'));
$versions[] = [
'name' => 'RedisCache',
'version' => self::VERSION,
'author' => 'Stéphane Bérubé (chimo)',
'homepage' => 'https://github.com/chimo/gs-rediscache',
'description' =>
// TRANS: Plugin description.
_m('Plugin implementing Redis as a backend for GNU social caching')
];
return true;
}
}
@@ -4,9 +4,9 @@ that uses Redis as it's backing storage.
Installation
============
This plugin is replaces other queue manager plugins, such as UnQueue,
which enabled by default and which should, but is not required to be
disabled.
This plugin replaces other queue manager plugins, such as UnQueue and DBQueue.
You don't have to disable them but it is recommended to only use a QueueManager
at a time.
addPlugin('RedisQueue', ['server' => 'your-redis-instance-and-port']);
@@ -15,4 +15,4 @@ Example
In config.php
addPlugin('RedisQueue', ['server' => 'tcp://localhost:6379']);
addPlugin('RedisQueue', ['server' => 'tcp://localhost:6379']);
+10 -7
Ver Arquivo
@@ -27,7 +27,7 @@ defined('GNUSOCIAL') || die();
class RedisQueuePlugin extends Plugin
{
const PLUGIN_VERSION = '0.0.1';
const PLUGIN_VERSION = '0.1.0';
// settings which can be set in config.php with addPlugin('RedisQueue', ['param'=>'value', ...]);
public $server = null;
@@ -40,12 +40,15 @@ class RedisQueuePlugin extends Plugin
public function onPluginVersion(array &$versions): bool
{
$versions[] = array('name' => 'RedisQueue',
'version' => self::PLUGIN_VERSION,
'author' => 'Miguel Dantas',
'description' =>
// TRANS: Plugin description.
_m('Plugin implementing Redis as a backend for GNU social queues'));
$versions[] = [
'name' => 'RedisQueue',
'version' => self::PLUGIN_VERSION,
'author' => 'Miguel Dantas',
'homepage' => GNUSOCIAL_ENGINE_URL,
'description' =>
// TRANS: Plugin description.
_m('Plugin implementing Redis as a backend for GNU social queues')
];
return true;
}
};
@@ -8,7 +8,7 @@ This plugin is replaces other queue manager plugins, such as UnQueue,
which enabled by default and which should, but is not required to be
disabled.
addPlugin('StompQueue', ['servers' => ['your-redis-instance-and-port'],
addPlugin('StompQueue', ['servers' => ['your-stomp-instance-and-port'],
'vhost' => 'your-vhost',
'username' => 'your-username',
'password' => 'your-password']);
@@ -39,4 +39,4 @@ In config.php
addPlugin('StompQueue', ['servers' => 'tcp://localhost:61613', 'vhost' => '/',
// Please don't actually use the default credentials
'username' => 'guest', 'password' => 'guest']);
'username' => 'guest', 'password' => 'guest']);
+10 -7
Ver Arquivo
@@ -27,7 +27,7 @@ defined('GNUSOCIAL') || die();
class StompQueuePlugin extends Plugin
{
const PLUGIN_VERSION = '0.0.1';
const PLUGIN_VERSION = '0.1.0';
// settings which can be set in config.php with addPlugin('StompQueue', ['param'=>'value', ...]);
public $servers = null;
@@ -61,12 +61,15 @@ class StompQueuePlugin extends Plugin
public function onPluginVersion(array &$versions): bool
{
$versions[] = array('name' => 'StompQueue',
'version' => self::PLUGIN_VERSION,
'author' => 'Miguel Dantas',
'description' =>
// TRANS: Plugin description.
_m('Plugin implementing STOMP as a backend for GNU social queues'));
$versions[] = [
'name' => 'StompQueue',
'version' => self::PLUGIN_VERSION,
'author' => 'Miguel Dantas',
'homepage' => GNUSOCIAL_ENGINE_URL,
'description' =>
// TRANS: Plugin description.
_m('Plugin implementing STOMP as a backend for GNU social queues')
];
return true;
}
};
-14
Ver Arquivo
@@ -1,14 +0,0 @@
UnQueuePlugin wraps the UnQueueManager class which is a queue manager that does all work immediately.
Installation
============
This plugin is enabled by default and cannot be disabled unless another queue manager is in use.
Disabling is not necessary but recommended in such cases.
Example
=======
In config.php
addPlugin('UnQueue');
+10
Ver Arquivo
@@ -0,0 +1,10 @@
UnQueuePlugin wraps the UnQueueManager class which is a queue manager that does all the work immediately.
INSTALL
=======
In config.php
addPlugin('UnQueue');
Be sure to disable other queues plugins.
+8 -6
Ver Arquivo
@@ -37,12 +37,14 @@ class UnQueuePlugin extends Plugin
public function onPluginVersion(array &$versions): bool
{
$versions[] = array('name' => 'UnQueue',
'version' => self::PLUGIN_VERSION,
'author' => 'Miguel Dantas',
'description' =>
// TRANS: Plugin description.
_m('Plugin using the database as a backend for GNU social queues'));
$versions[] = ['name' => 'UnQueue',
'version' => self::PLUGIN_VERSION,
'author' => 'Miguel Dantas',
'homepage' => GNUSOCIAL_ENGINE_URL,
'description' =>
// TRANS: Plugin description.
_m('Plugin using the database as a backend for GNU social queues')
];
return true;
}
};