Skip to content

Commit a92720d

Browse files
author
Anton Evers
committed
Make some functions private, because they are not useful outside
of this class. The public functions are either useful outside of this class or useful to disable or extend using plugins
1 parent cd6d480 commit a92720d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public function generate($groupId)
374374
* @param string $groupId
375375
* @return $this
376376
*/
377-
public function generateJobs($jobs, $exists, $groupId)
377+
private function generateJobs($jobs, $exists, $groupId)
378378
{
379379
foreach ($jobs as $jobCode => $jobConfig) {
380380
$cronExpression = $this->getCronExpression($jobConfig);
@@ -394,7 +394,7 @@ public function generateJobs($jobs, $exists, $groupId)
394394
* @param string $groupId
395395
* @return $this
396396
*/
397-
public function cleanup($groupId)
397+
private function cleanup($groupId)
398398
{
399399
$this->cleanupDisabledJobs($groupId);
400400

@@ -462,7 +462,7 @@ public function cleanup($groupId)
462462
* @param array $jobConfig
463463
* @return mixed
464464
*/
465-
public function getConfigSchedule($jobConfig)
465+
private function getConfigSchedule($jobConfig)
466466
{
467467
$cronExpr = $this->scopeConfig->getValue(
468468
$jobConfig['config_path'],
@@ -479,7 +479,7 @@ public function getConfigSchedule($jobConfig)
479479
* @param array $exists
480480
* @return void
481481
*/
482-
public function saveSchedule($jobCode, $cronExpression, $timeInterval, $exists)
482+
private function saveSchedule($jobCode, $cronExpression, $timeInterval, $exists)
483483
{
484484
$currentTime = $this->timezone->scopeTimeStamp();
485485
$timeAhead = $currentTime + $timeInterval;
@@ -510,7 +510,7 @@ public function saveSchedule($jobCode, $cronExpression, $timeInterval, $exists)
510510
* @param int $time
511511
* @return Schedule
512512
*/
513-
public function generateSchedule($jobCode, $cronExpression, $time)
513+
private function generateSchedule($jobCode, $cronExpression, $time)
514514
{
515515
$schedule = $this->scheduleFactory->create()
516516
->setCronExpr($cronExpression)
@@ -526,7 +526,7 @@ public function generateSchedule($jobCode, $cronExpression, $time)
526526
* @param string $groupId
527527
* @return int
528528
*/
529-
public function getScheduleTimeInterval($groupId)
529+
private function getScheduleTimeInterval($groupId)
530530
{
531531
$scheduleAheadFor = (int)$this->scopeConfig->getValue(
532532
'system/cron/' . $groupId . '/' . self::XML_PATH_SCHEDULE_AHEAD_FOR,
@@ -562,7 +562,7 @@ public function cleanupDisabledJobs($groupId)
562562
* @param $jobConfig
563563
* @return null|string
564564
*/
565-
public function getCronExpression($jobConfig)
565+
private function getCronExpression($jobConfig)
566566
{
567567
$cronExpression = null;
568568
if (isset($jobConfig['config_path'])) {
@@ -600,7 +600,7 @@ public function cleanupScheduleMismatches()
600600
/**
601601
* @return array
602602
*/
603-
public function getJobs()
603+
private function getJobs()
604604
{
605605
if (is_null($this->jobs)) {
606606
$this->jobs = $this->config->getJobs();

0 commit comments

Comments
 (0)