Пример #1
0
    def execute(self, context):
        hook = SegmentHook(segment_conn_id=self.segment_conn_id,
                           segment_debug_mode=self.segment_debug_mode)

        self.log.info(
            'Sending track event (%s) for user id: %s with properties: %s',
            self.event, self.user_id, self.properties)

        hook.track(user_id=self.user_id,
                   event=self.event,
                   properties=self.properties)
Пример #2
0
    def execute(self, context: Dict) -> None:
        hook = SegmentHook(segment_conn_id=self.segment_conn_id, segment_debug_mode=self.segment_debug_mode)

        self.log.info(
            'Sending track event (%s) for user id: %s with properties: %s',
            self.event,
            self.user_id,
            self.properties,
        )

        # pylint: disable=no-member
        hook.track(user_id=self.user_id, event=self.event, properties=self.properties)  # type: ignore