Add telephone numbers into the massive send list.
 It is recommended not to send more than 50 in each call

 Return TRUE if ok
   - see accepted in *last_addressees_accepted*
   - see rejected in *last_addressees_rejected*
972926
def add_addressee addressees, wait = true
      @addressees_accepted = false
      @addressees_rejected = false
      if addressees.kind_of?(Array)
        addressees = addressees.join ' '
      end

      cmd_dst addressees

      while wait && !@addressees_accepted
        wait_for last_label
        return false if !add_addressee_results
      end
    end
795582
def linkify_contactgroups_contacts(self, contacts):
        
        for contactgroup in self:
            mbrs = contactgroup.get_contacts()

            # The new member list, in id
            new_mbrs = []
            for mbr in mbrs:
                mbr = mbr.strip()  # protect with strip at the beginning so don't care about spaces
                if mbr == '':  # void entry, skip this
                    continue
                member = contacts.find_by_name(mbr)
                # Maybe the contact is missing, if so, must be put in unknown_members
                if member is not None:
                    new_mbrs.append(member.uuid)
                else:
                    contactgroup.add_unknown_members(mbr)

            # Make members uniq
            new_mbrs = list(set(new_mbrs))

            # We find the id, we replace the names
            contactgroup.replace_members(new_mbrs)
119007
private void send(T value)
  {
    for (SubscriberNode sub : _subscribers) {
      sub.next(value);
    }
    
    long seq = _sequence++;
    int size = _consumers.size();
    
    if (size > 0) {
      int index = (int) (seq % size);
      
      _consumers.get(index).next(value);
    }
  }
785721
public function checkMaxCall()
    {
        if ($this->krexxCount >= $this->maxCall) {
            // Called too often, we might get into trouble here!
            return true;
        }

        // Give feedback if this is our last call.
        if ($this->krexxCount === ($this->maxCall - 1)) {
            $this->pool->messages->addMessage('maxCallReached');
        }

        // Count goes up.
        ++$this->krexxCount;
        // Tell them that we are still good.
        return false;
    }
1138032
def post(self, request, *args, **kwargs):
        
        status = 201
        accepted = {"accepted": True}
        send_invite_messages.apply_async()
        return Response(accepted, status=status)
1124085
public void setPhoneNumbers(java.util.Collection<PhoneNumber> phoneNumbers) {
        if (phoneNumbers == null) {
            this.phoneNumbers = null;
            return;
        }

        this.phoneNumbers = new java.util.ArrayList<PhoneNumber>(phoneNumbers);
    }
850797
public void insert(String firstName, String lastName, String number)
	{
		entries.add(new PhoneBookEntry(this, firstName, lastName, number));
	}
367688
private void applyVerticalLimit()
    {
        if (mover.getY() < limitBottom && limitBottom != Integer.MIN_VALUE)
        {
            mover.teleportY(limitBottom);
        }
        else if (mover.getY() > limitTop && limitTop != Integer.MAX_VALUE)
        {
            mover.teleportY(limitTop);
        }
    }
1179365
def _conv_tel_list(tel_list, entry):
        """"""
        for tel in tel_list:
            if not hasattr(tel, 'TYPE_param'):
                entry['other'] = tel.value
            elif tel.TYPE_param.lower() == 'home':
                entry['phone'] = tel.value
            elif tel.TYPE_param.lower() == 'work':
                entry['workphone'] = tel.value
            elif tel.TYPE_param.lower() == 'cell':
                entry['mobile'] = tel.value
891013
public function evaluateLimits()
    {
        $limits = $this->getRepository()->findLimit(
            $this->contactClient,
            $this->getLimitRules(),
            $this->getTimezone(),
            $this->dateSend
        );
        if ($limits) {
            throw new ContactClientException(
                'Not able to send contact to client due to an exceeded budget.',
                Codes::HTTP_TOO_MANY_REQUESTS,
                null,
                Stat::TYPE_LIMITS,
                false,
                null,
                $limits
            );
        }
    }
1019388
public void addMissingRequests(){


        int missed=1;
        long toRequest=0L;


        do {
            long localQueued = queued.getAndSet(0l);
            Subscription localSub = next.getAndSet(null);
            long missedOutput = produced.get();



            Subscription localActive = active.get();
            long reqs = requested.get() + localQueued;

            if(reqs<0 || toRequest<0) {
                processAll=true;
                if(localSub!=null)
                    localSub.request(Long.MAX_VALUE);
                if(localActive!=null)
                    localActive.request(Long.MAX_VALUE);
                return;
            }
            requested.set(reqs);
            if(localSub!=null){
                active.set(localSub);
                toRequest +=reqs;
            }else if(localQueued !=0 && localActive!=null) {
                toRequest += reqs;
            }
            missed = wip.accumulateAndGet(missed,(a,b)->a-b);

        }while(missed!=0);

        if(toRequest>0)
            active.get().request(toRequest);

    }
139985
def add_invites(cls, amount):
        
        for user in get_user_model().objects.all():
            cls.add_invites_to_user(user, amount)
909777
def add(self, recipients):
        

        if recipients:
            if isinstance(recipients, str):
                self._recipients.append(
                    Recipient(address=recipients, parent=self._parent,
                              field=self._field))
            elif isinstance(recipients, Recipient):
                self._recipients.append(recipients)
            elif isinstance(recipients, tuple):
                name, address = recipients
                if address:
                    self._recipients.append(
                        Recipient(address=address, name=name,
                                  parent=self._parent, field=self._field))
            elif isinstance(recipients, list):
                for recipient in recipients:
                    self.add(recipient)
            else:
                raise ValueError('Recipients must be an address string, a '
                                 'Recipient instance, a (name, address) '
                                 'tuple or a list')
            self._track_changes()
66085
public void addEmailStats(final InternetAddress[] recipients, final boolean storageUsed) {
        this.storageUsed = storageUsed;
        for (InternetAddress recipient: recipients) {
            emailDests.add(recipient.getAddress());
        }
    }
965320
def call_senders(self, routing, clients_list, *args, **kwargs):
        
        for func, routings, routings_re in self.senders:
            call_callback = False

            # Message is published globally
            if routing is None or (routings is None and routings_re is None):
                call_callback = True

            # Message is not published globally
            else:

                # Message is catched by a string routing key
                if routings and routing in routings:
                    call_callback = True

                # Message is catched by a regex routing key
                if routings_re and any(r.match(routing) for r in routings_re):
                    call_callback = True

            if call_callback:
                func(routing, clients_list, *args, **kwargs)
1089105
def load_contacts email_addresses, opts={}
    contacts = Set.new
    num = opts[:num] || 20
    each_id_by_date :participants => email_addresses do |id,b|
      break if contacts.size >= num
      m = b.call
      ([m.from]+m.to+m.cc+m.bcc).compact.each { |p| contacts << [p.name, p.email] }
    end
    contacts.to_a.compact[0...num].map { |n,e| Person.from_name_and_email n, e }
  end
798128
def sendfrom(self, account, address, amount):
        """"""
        return self.req("sendfrom", [account, address, amount])