Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project overview
  • Repository
  • Issues 294
  • Merge Requests 38
  • CI / CD
  • Security & Compliance
  • Packages
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !410

Open
Opened 6 days ago by Guy Thouret@gthouret
Report abuse

Refactor Boost Code

Closes #1149

Edited 1 day ago by Guy Thouret
Request to merge feat/1149-boost-refactor into master
The source branch is 12 commits behind the target branch
Open in Web IDE
Pipeline #100046485 passed for 722e6865 on feat/1149-boost-refactor
          Requires 3 more approvals from Devs, Deployers, and QA.
          Marcelo Rivera
          Marcelo Rivera
          Olivia Madrid
          Olivia Madrid
          Emiliano Balbuena
          Emiliano Balbuena
          Mark Harding
          Mark Harding
          Rami Albatal
          Rami Albatal
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Closes #1149

          • Discussion 5
          • Commits 1
          • Pipelines 5
          • Changes 54
          0/5 threads resolved
          • Guy Thouret @gthouret changed milestone to %Boost Refactor #mvp 6 days ago

            changed milestone to %Boost Refactor #mvp

          • Guy Thouret @gthouret added MR::Awaiting Review Squad::Blue scoped labels 6 days ago

            added scoped labels

          • Guy Thouret @gthouret added 1 commit 1 day ago

            added 1 commit

            • cd72577e - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret @gthouret added 1 commit 1 day ago

            added 1 commit

            • e7269ef5 - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret @gthouret added 1 commit 1 day ago

            added 1 commit

            • 6efd9e52 - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret @gthouret added 1 commit 1 day ago

            added 1 commit

            • 722e6865 - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret @gthouret unmarked as a Work In Progress 1 day ago

            unmarked as a Work In Progress

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 10 minutes ago
            Core/Boost/Feed.php
            1 <?php
            2
            3 namespace Minds\Core\Boost;
            4
            5 use Minds\Core\Data\cache\abstractCacher;
            6 use Minds\Core\Entities\Resolver;
            7 use Minds\Entities\User;
            8 use Minds\Core;
            9 use Minds\Helpers\Time;
            10
            11 abstract class Feed
            • Mark Harding
              Mark Harding @markeharding · 10 minutes ago
              Owner

              rename to AbstractFeed

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 10 minutes ago
            Core/Boost/Feed.php
            27 protected $quality = 0;
            28 protected $type = 'newsfeed';
            29
            30 protected $offsetCacheTtl = Time::FIVE_MIN;
            31
            32 public function __construct(
            33 User $currentUser = null,
            34 Resolver $resolver = null,
            35 abstractCacher $cacher = null
            36 ) {
            37 $this->currentUser = $currentUser ?: Core\Session::getLoggedinUser();
            38 $this->resolver = $resolver ?: new Resolver();
            39 $this->cacher = $cacher ?: Core\Data\cache\factory::build('Redis');
            40 }
            41
            42 public function setMockIterator($mockIterator): self
            • Mark Harding
              Mark Harding @markeharding · 10 minutes ago
              Owner

              Can we get some phpdoc markup on these functions?

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 6 minutes ago
            Core/Boost/Network/Repository.php → Core/Boost/Network/CassandraRepository.php
            116 103 return $response;
            117 104 }
            118 105
            106 protected function updateTimestampsToMsValues(array $data): array
            • Mark Harding
              Mark Harding @markeharding · 6 minutes ago
              Owner

              phpdoc

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 5 minutes ago
            Core/Boost/Network/Repository.php → Core/Boost/Network/CassandraRepository.php
            112 }
            113
            114 if (isset($data['time_created'])) {
            115 if ($data['time_created'] < Time::HISTORIC_MS_VALUE) {
            116 $data['time_created'] = Time::sToMs($data['time_created']);
            117 }
            118 }
            119
            120 if ($data['@created'] < Time::HISTORIC_MS_VALUE) {
            121 $data['@created'] = Time::sToMs($data['@created']);
            122 }
            123
            124 return $data;
            125 }
            126
            127 protected function updateOldSchema(array $data): array
            • Mark Harding
              Mark Harding @markeharding · 5 minutes ago
              Owner

              phpdoc

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 2 minutes ago
            Entities/Boost/Network.php
            447 424 $export = array_merge($export, \Minds\Core\Events\Dispatcher::trigger('export:extender', 'all', ['entity' => $this], []));
            448 425 $export = \Minds\Helpers\Export::sanitize($export);
            449 426
            450 $export['met_impressions'] = Counters::get((string) $this->getId(), "boost_impressions")
            • Mark Harding
              Mark Harding @markeharding · 2 minutes ago
              Owner

              We need to confirm if this is going to break counters pre-elasticsearch migration.

            • Please register or sign in to reply
          Please register or sign in to reply
          0 Assignees
          None
          Boost Refactor #mvp
          Milestone
          Boost Refactor #mvp
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Awaiting Review Squad::Blue
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Marcelo Rivera
          user avatar
          Olivia Madrid
          user avatar
          Emiliano Balbuena
          user avatar
          Mark Harding
          user avatar
          Rami Albatal
          user avatar
          Ben Hayward
          user avatar
          Martin Santangelo
          Reference: minds/engine!410