Add an audience to the activity

 @param activity: [Socializer::Activity] The activity to add the audience
 to
761412
def add_audience_to_activity(activity:)
      object_ids_array.each do |audience_id|
        privacy  = audience_privacy(audience_id: audience_id)
        audience = activity.audiences.build(privacy: privacy)

        audience.activity_object_id = audience_id if privacy == limited_privacy
      end
    end
581892
function Channel_addAgent(agent) {
  DEBUG("channel.addAgent(" + utils.JS(agent.info) + ")")
  this.agents.set(agent.info.id, agent)
  this.session.sendEvent("agentCreated", "server", agent.info)
}
244886
def add_actors(self, actor):
        
        if isinstance(actor, list):
            self.actors.extend(actor)
        elif isinstance(actor, Actor):
            self.actors.append(actor)
        return self
1208930
def activity_show(self, activity_id, **kwargs):
        ""
        api_path = "/api/v2/activities/{activity_id}.json"
        api_path = api_path.format(activity_id=activity_id)
        return self.call(api_path, **kwargs)
606236
def add_action_to(cls, parser, action, subactions, level):
        
        p = parser.add_parser(action.name,
                              description=action.description,
                              argument_default=argparse.SUPPRESS)
        for arg in action.args:
            arg.add_argument_to(p)

        if subactions:
            subparsers = cls._add_subparsers_required(p,
                dest=settings.SUBASSISTANT_N_STRING.format(level),
                title=cls.subactions_str,
                description=cls.subactions_desc)
            for subact, subsubacts in sorted(subactions.items(), key=lambda x: x[0].name):
                cls.add_action_to(subparsers, subact, subsubacts, level + 1)
728023
synchronized void add(ConsumerSessionImpl consumer)
  {
    consumer.setId(_consumerCount);
    
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "add", new Long(consumer.getIdInternal()) );

    _consumers.put(new Long(_consumerCount), consumer);

    _consumerCount++;

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "add");
  }
891392
def new_link(*args, &block)
      raise NotActorError, "can't link outside actor context" unless Celluloid.actor?

      proxy = Cell.new(allocate, behavior_options, actor_options).proxy
      Actor.link(proxy)
      proxy._send_(:initialize, *args, &block)
      proxy
    end
422325
function startActivity(activityMessage) {
  var activityId = createActivity(activityMessage);

  markActivity(activityId);

  var activity = getActivity(activityId);
  writeActivity(activityEvents.start, activity);

  return activityId;
}
1235822
def create_activity!(*args)
      return unless self.public_activity_enabled?
      options = prepare_settings(*args)

      if call_hook_safe(options[:key].split('.').last)
        reset_activity_instance_options
        return PublicActivity::Adapter.create_activity!(self, options)
      end
    end
1208880
def add(self, effect):
        
        effect.instance = self.instance_index
        self.instance_index += 1

        self.connection.send(ProtocolParser.add(effect))
341559
private void launchIntent(Intent intent) {
        if (intent == null) {
            return;
        }
        try {
            // If the intent was created from a suggestion, it will always have an explicit
            // component here.
            getContext().startActivity(intent);
        } catch (RuntimeException ex) {
            Log.e(LOG_TAG, "Failed launch activity: " + intent, ex);
        }
    }
639707
def add_used_entity(self, entity_uri):
        
        entity_o = URIRef(entity_uri)
        self.prov_g.add((entity_o, RDF.type, self.prov.Entity))
        self.prov_g.add((self.activity, self.prov.used, entity_o))
720256
def run_activity(self):
        
        activity = self.current.activity
        if activity:
            if activity not in self.wf_activities:
                self._load_activity(activity)
            self.current.log.debug(
                "Calling Activity %s from %s" % (activity, self.wf_activities[activity]))
            self.wf_activities[self.current.activity](self.current)
84101
def prepare_relation(name, options)
      PublicActivity.resolve_value(self,
        (options.has_key?(name) ? options[name] : (
          self.send("activity_#{name}") || self.class.send("activity_#{name}_global")
          )
        )
      )
    end
1334616
private void updateActivity(ActivityType type, String name, String streamingUrl) {
        if (name == null) {
            activity = null;
        } else if (streamingUrl == null) {
            activity = new ActivityImpl(type, name, null);
        } else {
            activity = new ActivityImpl(type, name, streamingUrl);
        }
        websocketAdapter.updateStatus();
    }
809469
def add(severity, message = nil, progname = nil, &block)
      progname ||= @progname
      severity ||= UNKNOWN

      return event.id if severity < @level

      if message.nil? && !block_given?
        message = progname
        progname = @progname
      end

      event = LogEvent.new(severity, message, progname, &block)

      @buffers[progname][severity] << event

      if severity >= @threshold
        begin
          Celluloid::Notifications.notifier.async.publish(incident_topic, create_incident(event))
        rescue => ex
          @fallback_logger.error(ex)
        end
      end
      event.id
    end
725488
public synchronized void     add(QueueGroups group, Activity activity, long delay, TimeUnit unit)
    {
        ActivityHolder  holder = new ActivityHolder(activity, TimeUnit.MILLISECONDS.convert(delay, unit));
        queues.get(group).offer(holder);
    }