Commit 4a12a7d8 authored by Mark Harding's avatar Mark Harding

(chore): remove legacy feed dispatcher

parent 3f81d85a
No related merge requests found
Pipeline #72299962 passed with stages
in 11 minutes and 30 seconds
......@@ -68,17 +68,7 @@ class Feeds
*/
public function dispatch(Blog $blog)
{
if (in_array($blog->getAccessId(), [2, 1, -1])) {
$this->queue
->setQueue('FeedDispatcher')
->send([
'guid' => $blog->getGuid(),
'owner_guid' => $blog->getOwnerGuid(),
'type' => $blog->getType(),
'subtype' => $blog->getSubtype(),
'super_subtype' => '',
]);
}
}
/**
......
......@@ -83,65 +83,6 @@ class FeedsSpec extends ObjectBehavior
->shouldNotThrow();
}
function it_should_dispatch(
Blog $blog
)
{
$blog->getAccessId()
->shouldBeCalled()
->willReturn(2);
$blog->getGuid()
->shouldBeCalled()
->willReturn(5000);
$blog->getOwnerGuid()
->shouldBeCalled()
->willReturn(1000);
$blog->getType()
->shouldBeCalled()
->willReturn('object');
$blog->getSubtype()
->shouldBeCalled()
->willReturn('blog');
$this->queue->setQueue('FeedDispatcher')
->shouldBeCalled()
->willReturn($this->queue);
$this->queue->send([
'guid' => 5000,
'owner_guid' => 1000,
'type' => 'object',
'subtype' => 'blog',
'super_subtype' => '',
])
->shouldBeCalled()
->willReturn(null);
$this
->dispatch($blog)
->shouldNotThrow();
}
function it_should_not_dispatch_if_access_id_0(
Blog $blog
)
{
$blog->getAccessId()
->shouldBeCalled()
->willReturn(0);
$this->queue->send(Argument::cetera())
->shouldNotBeCalled();
$this
->dispatch($blog)
->shouldNotThrow();
}
function it_should_get_feed_items(
Blog $blog
)
......
......@@ -1090,17 +1090,6 @@ abstract class ElggEntity extends ElggData implements
$db->insert($index, $data);
}
if (in_array($this->access_id, array(2, -2, 1))) {
Minds\Core\Queue\Client::build()->setQueue("FeedDispatcher")
->send(array(
"guid" => $this->guid,
"owner_guid" => $this->owner_guid,
"type" => $this->type,
"subtype" => $this->subtype,
"super_subtype" => $this->super_subtype
));
}
if(!$new && $this->access_id != ACCESS_PUBLIC){
$remove = array("$this->type", "$this->type:$this->subtype", "$this->type:$this->super_subtype");
// foreach($remove as $index)
......
......@@ -23,7 +23,7 @@ process_name=%(program_name)s_%(process_num)02d
command=php /var/www/Minds/engine/cli.php QueueRunner run --runner=FeedDispatcher
autostart=true
autorestart=true
numprocs=20
numprocs=0
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment