Sets the number of employer bees; at least two are required

        Args:
            num_employers (int): number of employer bees
350630
def num_employers(self, num_employers):
        '''
        '''

        if num_employers < 2:
            self._logger.log(
                'warn',
                'Two employers are needed: setting to two'
            )
            num_employers = 2
        self._num_employers = num_employers
        self._logger.log('debug', 'Number of employers set to {}'.format(
            num_employers
        ))
        self._limit = num_employers * len(self._value_ranges)
        self._logger.log('debug', 'Limit set to {}'.format(self._limit))
654624
public void setNumShards(final int numShards)
	{
		Preconditions.checkArgument(numShards > 0, "A Counter must have at least 1 CounterShard!");

		this.numShards = numShards;
		this.setUpdatedDateTime(new DateTime(DateTimeZone.UTC));
	}
1558
def n_waiting(self):
        """"""
        return self._counters[JobStatus.no_job] +\
            self._counters[JobStatus.unknown] +\
            self._counters[JobStatus.not_ready] +\
            self._counters[JobStatus.ready]
381408
def register_jobs(self, job_dict):
        """"""
        njobs = len(job_dict)
        sys.stdout.write("Registering %i total jobs: " % njobs)
        for i, job_details in enumerate(job_dict.values()):
            if i % 10 == 0:
                sys.stdout.write('.')
                sys.stdout.flush()
            self.register_job(job_details)
        sys.stdout.write('!\n')
1285080
def set_many(self, nodes):
        
        data = self._prepare_nodes(nodes)
        self._set_many(data)
405158
def assign_qualification(self, qualification_id, worker_id, score, notify=False):
        """"""
        return self._is_ok(
            self.mturk.associate_qualification_with_worker(
                QualificationTypeId=qualification_id,
                WorkerId=worker_id,
                IntegerValue=score,
                SendNotification=notify,
            )
        )
1324944
def set_out(self, que_out, num_followers):
        """"""
        for p in self.processes:
            p.set_out(que_out, num_followers)
1302394
public void setEnterpriseNumber(int index, Number value)
   {
      set(selectField(TaskFieldLists.ENTERPRISE_NUMBER, index), value);
   }
579343
def set_npartitions(self, npartitions=None):
        
        if npartitions is None:
            self._npartitions = cpu_count() * 2
        else:
            self._npartitions = npartitions
        return self
1142420
def set_input_jobs(input_jobs)
      segment_count = 0
      input_paths = []

      input_jobs.each do |job_name|
        input_job = Job.where(:job_name => job_name,
                              :type => 'Elasticrawl::ParseJob').first_or_initialize
        step_count = input_job.job_steps.count

        if step_count > 0
          segment_count += step_count
          input_paths << set_input_path(input_job)
        end
      end

      self.job_name = set_job_name
      self.job_desc = set_job_desc(segment_count)
      job_steps.push(create_job_step(input_paths.join(',')))
    end
661057
def check_jobs(jobs):
    """"""
    if jobs == 0:
        raise click.UsageError("Jobs must be >= 1 or == -1")
    elif jobs < 0:
        import multiprocessing

        jobs = multiprocessing.cpu_count()
    return jobs
1017212
def set(self, num):
        
        if self.validate(num) is not None:
            self.index = self.allowed.index(num)
        IntegerEntry.set(self, num)
586691
public void setEnterpriseNumber(int index, Number value)
   {
      set(selectField(ResourceFieldLists.ENTERPRISE_NUMBER, index), value);
   }
563684
def qualify(workers, qualification, value, by_name, notify, sandbox):
    """"""
    if not (workers and qualification and value):
        raise click.BadParameter(
            "Must specify a qualification ID, value/score, and at least one worker ID"
        )
    mturk = _mturk_service_from_config(sandbox)
    if by_name:
        result = mturk.get_qualification_type_by_name(qualification)
        if result is None:
            raise click.BadParameter(
                'No qualification with name "{}" exists.'.format(qualification)
            )

        qid = result["id"]
    else:
        qid = qualification

    click.echo(
        "Assigning qualification {} with value {} to {} worker{}...".format(
            qid, value, len(workers), "s" if len(workers) > 1 else ""
        )
    )
    for worker in workers:
        if mturk.set_qualification_score(qid, worker, int(value), notify=notify):
            click.echo("{} OK".format(worker))

    # print out the current set of workers with the qualification
    results = list(mturk.get_workers_with_qualification(qid))

    click.echo("{} workers with qualification {}:".format(len(results), qid))

    for score, count in Counter([r["score"] for r in results]).items():
        click.echo("{} with value {}".format(count, score))
310073
public void setEnterpriseNumber(int index, Number value)
   {
      set(selectField(AssignmentFieldLists.ENTERPRISE_NUMBER, index), value);
   }
590690
def setOrderedRegisterNumbers(order, start):
    
    for i, node in enumerate(order):
        node.reg.n = start + i
    return start + len(order)
998446
private void setJobId(String id) {
    if (id != null && id.startsWith("job_") && id.length() > 4) {
      this.jobNumber = id.substring(4);
    }
  }