Publish a scheduling object event.

        Args:
            object_id (str): ID of the scheduling object
            event_type (str): Type of event.
            event_data (dict, optional): Event data.
965047
def publish(self, object_id: str, event_type: str,
                event_data: dict = None):
        
        object_key = SchedulingObject.get_key(self.type, object_id)
        publish(event_type=event_type,
                event_data=event_data,
                object_type=self.type,
                object_id=object_id,
                object_key=object_key,
                origin=None)
1097094
def publishing_column(self, obj):
        
        # TODO Hack to convert polymorphic objects to real instances
        if hasattr(obj, 'get_real_instance'):
            obj = obj.get_real_instance()

        try:
            object_url = obj.get_absolute_url()
        except (NoReverseMatch, AttributeError):
            object_url = ''

        template_name = 'admin/publishing/_change_list_publishing_column.html'
        t = loader.get_template(template_name)
        c = Context({
            'object': obj,
            'object_url': object_url,
            'has_publish_permission':
                self.has_publish_permission(self.request, obj),
            'has_preview_permission':
                self.has_preview_permission(self.request, obj),
        })
        try:
            if isinstance(obj, PublishingModel):
                c['publish_url'] = reverse(
                    self.publish_reverse(type(obj)), args=(obj.pk, ))
                c['unpublish_url'] = reverse(
                    self.unpublish_reverse(type(obj)), args=(obj.pk, ))
        except NoReverseMatch:
            pass
        return t.render(c)
989859
def publish(self, message_type=ON_SEND, client_id=None, client_storage=None,
                *args, **kwargs):
        
        self.publisher.publish(
            message_type, client_id, client_storage, *args, **kwargs)
86848
def _get_events_list(object_key: str) -> List[str]:
    
    return DB.get_list(_keys.events_list(object_key))
164077
private void publishEvent(WSJobExecution objectToPublish, String eventToPublishTo, String correlationId) {
        if (eventsPublisher != null) {
            eventsPublisher.publishJobExecutionEvent(objectToPublish, eventToPublishTo, correlationId);
        }
    }
1166403
private void publishEvent(WSJobExecution objectToPublish, String eventToPublishTo) {
        if (getBatchEventsPublisher() != null) {
            getBatchEventsPublisher().publishJobExecutionEvent(objectToPublish, eventToPublishTo, correlationId);
        }
    }
594959
def post(self, id=None):
        
        try:

            try:
                base_object = json_util.loads(self.request.body)
            except TypeError:
                base_object = json_util.loads(self.request.body.decode())

            #assert not hasattr(base_object, "_id")

            toa = self.request.headers.get("Caesium-TOA", None)

            if toa:
                # Async create flow
                stack = AsyncSchedulableDocumentRevisionStack(self.client.collection_name, self.settings)

                revision_id = yield stack.push(base_object, toa=int(toa), meta=self._get_meta_data())
                resource = yield stack.preview(revision_id)

                if isinstance(revision_id, str):
                    self.set_header("Caesium-TOA", toa)
                    self.return_resource(resource.get("snapshot"))
                else:
                    self.raise_error(404, "Revision not scheduled for object: %s" % id)

            else:

                id = yield self.client.insert(base_object)
                base_object = yield self.client.find_one_by_id(id)

                self.return_resource(base_object)

        except ValidationError as vex:
            self.logger.error("%s validation error" % self.object_name, vex)
            self.raise_error(400, "Your %s cannot be created because it is missing required fields, see docs" % self.object_name)
        except ValueError as ex:
            self.raise_error(400, "Invalid JSON Body, check formatting. %s" % ex[0])
        except Exception as ex:
            self.logger.error(ex)
            self.raise_error()
1102818
def post_event(id, event, options = {})
      data = options
      data['id'] = id
      data['event'] = event
      api_post(:event, data)
    end
1355470
def update(self, id, **kwargs):
        

        response = self.ghost.execute_put('%s/%s/' % (self._type_name, id), json={
            self._type_name: [
                kwargs
            ]
        })

        return self._model_type(response.get(self._type_name)[0])
264293
def set_schedule(self, data):
        
        value = Schedule.build(data)
        self._conn.make_request(PROP_WRITE_HANDLE, value)
1182345
def handle_publish(client, data)
      topic_uri, payload, exclude, include = data

      @engine.create_event(client, topic_uri, payload, exclude, include)

      trigger(:publish, client, topic_uri, payload, exclude, include)
    end
1327116
def _get_events_data(object_key: str) -> List[dict]:
    
    events_data = []
    key = _keys.events_data(object_key)
    for event_id in _get_events_list(object_key):
        event_dict = literal_eval(DB.get_hash_value(key, event_id))
        events_data.append(event_dict)
    return events_data
508641
def scheduled_event_trigger(self, event_type):
        """"""
        def callback(when, **kwargs):
            self.queued_scheduled_events.append((when, event_type(when=when, **kwargs)))
        return callback
975865
def delete_event(self, calendar_id, event_id):
        
        self.request_handler.delete(endpoint='calendars/%s/events' % calendar_id, data={'event_id': event_id})
1025015
def publish(self, dataset_identifier, content_type="json"):
        '''
        
        '''
        base = _format_old_api_request(dataid=dataset_identifier)
        resource = "{0}/publication.{1}".format(base, content_type)

        return self._perform_request("post", resource)
1354296
def post_event_ticket_classes(self, id, **data):
        
        
        return self.post("/events/{0}/ticket_classes/".format(id), data=data)
723148
def publish(self, channel_id):
        
        payload = {
            "channel_id":channel_id,
        }
        response = config.SESSION.post(config.publish_channel_url(), data=json.dumps(payload))
        response.raise_for_status()