Finds all subscriptions pending synchronisation.

@return Subscription[]
322088
public function findPendingSynchronisation()
    {
        return $this->createQueryBuilder('s')
            ->innerjoin('s.mailingList', 'm')
            ->andWhere('s.status = :pending OR s.status = :failed')
            ->setParameters([
                'pending' => Subscription::STATUS_PENDING,
                'failed' => Subscription::STATUS_FAILED,
            ])
            ->getQuery()
            ->getResult();
    }
698197
public function getAll()
    {
        $result = [
            self::ENTRY_ID           => $this->_id,
            self::ENTRY_NAME         => $this->_name,
            self::ENTRY_WAIT_SYNC    => $this->_waitForSync,
            self::ENTRY_JOURNAL_SIZE => $this->_journalSize,
            self::ENTRY_IS_SYSTEM    => $this->_isSystem,
            self::ENTRY_IS_VOLATILE  => $this->_isVolatile,
            self::ENTRY_TYPE         => $this->_type,
            self::ENTRY_STATUS       => $this->_status,
            self::ENTRY_KEY_OPTIONS  => $this->_keyOptions
        ];

        if (null !== $this->_numberOfShards) {
            $result[self::ENTRY_NUMBER_OF_SHARDS] = $this->_numberOfShards;
        }
        
        if (null !== $this->_replicationFactor) {
            $result[self::ENTRY_REPLICATION_FACTOR] = $this->_replicationFactor;
        }
        
        if (null !== $this->_shardingStrategy) {
            $result[self::ENTRY_SHARDING_STRATEGY] = $this->_shardingStrategy;
        }

        if (is_array($this->_shardKeys)) {
            $result[self::ENTRY_SHARD_KEYS] = $this->_shardKeys;
        }

        return $result;
    }
1038012
public function getStepIndexes()
    {
        $dates = [];

        // TODO : Think about doing this a cleaner way with carbon instead with timestamps ...
        $current = $this->start->timestamp;
        $last = $this->end->timestamp;

        while ($current <= $last) {
            $dates[] = date($this->getStepFormat(), $current);
            $current = strtotime($this->getStepIncrement(), $current);
        }

        return $dates;
    }
799517
protected function commitChanges(): array
    {
        $updated = [];
        foreach ($this->sortedTables() as $table) {
            if ($table->getStatus() == AbstractTable::STATUS_DECLARED_DROPPED) {
                $table->save(HandlerInterface::DO_DROP);
                continue;
            }

            $updated[] = $table;
            $table->save(
                HandlerInterface::DO_ALL
                ^ HandlerInterface::DROP_FOREIGN_KEYS
                ^ HandlerInterface::DROP_INDEXES
                ^ HandlerInterface::CREATE_FOREIGN_KEYS
            );
        }

        return $updated;
    }
980341
public function findPendingSynchronisationList(MailingList $mailingList)
    {
        return $this->createQueryBuilder('s')
            ->innerjoin('s.mailingList', 'm')
            ->where('s.mailingList = :mailingList')
            ->andWhere('s.status = :pending OR s.status = :failed')
            ->setParameters([
                'mailingList' => $mailingList,
                'pending' => Subscription::STATUS_PENDING,
                'failed' => Subscription::STATUS_FAILED,
            ])
            ->getQuery()
            ->getResult();
    }
1070093
public List<Subscription> findAllSubscriptions() {
        EntityManager entityManager = getEntityManager();
        try {
			return entityManager
					.createQuery("SELECT subscription FROM Subscription AS subscription", Subscription.class)
					.getResultList();

		} finally {
			entityManager.close();
		}
	}
119679
def active_subscriptions(self):
		
		return self.subscriptions.filter(
			status=enums.SubscriptionStatus.active, current_period_end__gt=timezone.now()
		)
146939
public function getData()
    {
        $subscription = $this->subscriptionManager
            ->findOneBy(
                ['userId' => $this->tokenStorage->getToken()->getUser()->getId(), 'handler' => 'portlet']
            );

        if (!$subscription) {
            return [];
        }

        $filter = $subscription->getFilter();

        if (!$filter) {
            return [];
        }

        $messages = $this->messageManager->findByCriteria($filter->getCriteria(), ['createdAt' => 'DESC'], 20);

        $priorityList = $this->messageManager->getPriorityNames();
        $typeList = $this->messageManager->getTypeNames();

        $data = [];
        foreach ($messages as $message) {
            $subject = '';

            $i = 0;
            do {
                $subject .= ($i ? '<wbr />' : '').mb_substr($message->getSubject(), $i, $i + 30, 'UTF-8');
                $i += 30;
            } while ($i <= strlen($message->getSubject()));

            $data[] = [
                'id' => $message->getId(),
                'subject' => $subject,
                'time' => $message->getCreatedAt()->format('U'),
                'priority' => $priorityList[$message->getPriority()],
                'type' => $typeList[$message->getType()],
                'channel' => $message->getChannel(),
            ];
        }

        return $data;
    }
1359262
public List<Subscription> getSubscriptions() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        return getSubscriptions(null, null);
    }
721646
protected function getSyncListItems() {
        if (!$this->_syncListItems) {
            $this->_syncListItems = new SyncListItemList(
                $this->version,
                $this->solution['serviceSid'],
                $this->solution['sid']
            );
        }

        return $this->_syncListItems;
    }
737596
public function AllSuccessArray() {
        $r=array();
        foreach($this->items as $v) {
            $r=array_merge($r,$v->allSuccess());
        }
        return $r;
    }
1222883
public static function getSubscribedEvents()
    {
        return array(
            InstallerEvents::POST_DEPENDENCIES_SOLVING => array(
                array('checkCoreDependencies', 0)
            ),
            PackageEvents::POST_PACKAGE_INSTALL => array(
                array('installCore', 0)
            ),
            PackageEvents::PRE_PACKAGE_UPDATE => array(
                array('uninstallCore', 0)
            ),
            PackageEvents::POST_PACKAGE_UPDATE => array(
                array('installCore', 0)
            ),
            PackageEvents::PRE_PACKAGE_UNINSTALL => array(
                array('uninstallCore', 0)
            ),
        );
    }
291726
public function getAll()
    {
        $listeners = [];

        // Get a clone of the queue.
        $queue = $this->getIterator();

        foreach ($queue as $listener) {
            $listeners[] = $listener;
        }

        return $listeners;
    }
463748
public function findAll()
    {
        $this->pending();
        $this->data = $this->resetKeys ? array_values($this->data) : $this->data;

        return clone $this;
    }
1114194
public function contactSync()
    {
        if ($this->jobHasAlreadyBeenRun('ddg_automation_customer_subscriber_guest_sync')) {
            $message = 'Skipping ddg_automation_customer_subscriber_guest_sync job run';
            $this->helper->log($message);
            return ['message' => $message];
        }

        //run the sync for contacts
        $result = $this->contactFactory->create()
            ->sync();
        //run subscribers and guests sync
        $subscriberResult = $this->subscribersAndGuestSync();

        if (isset($subscriberResult['message']) && isset($result['message'])) {
            $result['message'] = $result['message'] . ' - '
                . $subscriberResult['message'];
        }

        return $result;
    }
316580
public static function getSubscribedEvents()
    {
        return array(
            FOSUserEvents::CHANGE_PASSWORD_INITIALIZE => 'dispatchChangePasswordInitialize',
            FOSUserEvents::CHANGE_PASSWORD_SUCCESS => 'dispatchChangePasswordSuccess',
            FOSUserEvents::CHANGE_PASSWORD_COMPLETED => 'dispatchChangePasswordCompleted',
            FOSUserEvents::GROUP_CREATE_INITIALIZE => 'dispatchGroupCreateInitialize',
            FOSUserEvents::GROUP_CREATE_SUCCESS => 'dispatchGroupCreateSuccess',
            FOSUserEvents::GROUP_CREATE_COMPLETED => 'dispatchGroupCreateCompleted',
            FOSUserEvents::GROUP_DELETE_COMPLETED => 'dispatchGroupDeleteCompleted',
            FOSUserEvents::GROUP_EDIT_INITIALIZE => 'dispatchGroupEditInitialize',
            FOSUserEvents::GROUP_EDIT_SUCCESS => 'dispatchGroupEditSuccess',
            FOSUserEvents::GROUP_EDIT_COMPLETED => 'dispatchGroupEditCompleted',
            FOSUserEvents::PROFILE_EDIT_INITIALIZE => 'dispatchProfileEditInitialize',
            FOSUserEvents::PROFILE_EDIT_SUCCESS => 'dispatchProfileEditSuccess',
            FOSUserEvents::PROFILE_EDIT_COMPLETED => 'dispatchProfileEditCompleted',
            FOSUserEvents::REGISTRATION_INITIALIZE => 'dispatchRegistrationInitialize',
            FOSUserEvents::REGISTRATION_SUCCESS => 'dispatchRegistrationSuccess',
            FOSUserEvents::REGISTRATION_COMPLETED => 'dispatchRegistrationCompleted',
            FOSUserEvents::REGISTRATION_CONFIRM => 'dispatchRegistrationConfirm',
            FOSUserEvents::REGISTRATION_CONFIRMED => 'dispatchRegistrationConfirmed',
            FOSUserEvents::RESETTING_RESET_INITIALIZE => 'dispatchResettingResetInitialize',
            FOSUserEvents::RESETTING_RESET_SUCCESS => 'dispatchResettingResetSuccess',
            FOSUserEvents::RESETTING_RESET_COMPLETED => 'dispatchResettingResetCompleted',
            FOSUserEvents::SECURITY_IMPLICIT_LOGIN => 'dispatchSecurityImplicitLogin',
        );
    }
1222640
public function getQueueableIds()
    {
        if ($this->isEmpty()) {
            return [];
        }

        return $this->first() instanceof QueueableEntity
                    ? $this->map->getQueueableId()->all()
                    : $this->modelKeys();
    }