Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24132ae5 authored by Arnau Vàzquez's avatar Arnau Vàzquez
Browse files

Merge branch 'filesize-check' into 'master'

Check build size before adding to builds array in response

See merge request !31
parents 0b56ab40 b0ea21c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -520,7 +520,7 @@
         */
        public function includeInResults($params)
        {
            return $this->isValid($params) && $this->checkRollout();
            return $this->isValid($params) && $this->checkRollout() && $this->getSize() > 0;
        }

        /**
+6 −4
Original line number Diff line number Diff line
@@ -206,14 +206,16 @@
                        
                        if ($build->includeInResults($this->postData['params'])) {
                            array_push($this->builds, $build);
                            if (!empty($this->postData['params']) && strcmp($this->postData['params']['source_incremental'], $build->getIncremental()) == 0) {
                        }
                        
                        $sourceIncremental = isset($this->postData['params']['source_incremental']) ? $this->postData['params']['source_incremental'] : NULL;
                        if ($build->isValid($this->postData['params']) && $sourceIncremental && strcmp($sourceIncremental, $build->getIncremental()) === 0) {
                            $this->currentBuild = $build;
                            $this->logger->info($build->getIncremental().' is the current build');
                        }
                    }
                }
            }
            }
            $this->logger->debug('Total execution  time  of getBuilds in seconds');
        }