Ejemplo n.º 1
0
def subscribe_to_main_list(email: str):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "subscribe_to_main_list",
            "email": email
        },
    )
Ejemplo n.º 2
0
def export_event_to_google(event_pk: int):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "export_event_to_google",
            "event_pk": event_pk
        },
    )
Ejemplo n.º 3
0
def send_new_ticket_email(ticket: models.Ticket):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "send_new_ticket_email",
            "ticket_id": ticket.id,
        },
    )
Ejemplo n.º 4
0
def notify_slack_by_event_version(version_id: int):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "notify_slack_by_event_version",
            "version_id": version_id
        },
    )
Ejemplo n.º 5
0
def post_to_telegram_chat(chat_id: int, message: str):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "post_to_telegram_chat",
            "chat_id": chat_id,
            "message": message,
        },
    )
Ejemplo n.º 6
0
def notify_slack_about_fulfilled_order(order: models.Order,
                                       ticket: models.Ticket):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "notify_slack_about_fulfilled_order",
            "order_uuid": order.uuid,
            "ticket_id": ticket.id,
        },
    )
Ejemplo n.º 7
0
def job_send_event_cancellation_emails(event_pk: int,
                                       notification_message: str):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "send_event_cancellation_emails",
            "event_pk": event_pk,
            "notification_message": notification_message,
        },
    )
Ejemplo n.º 8
0
def job_send_ticket_confirmation_email(ticket_id: int,
                                       signed_in: Optional[bool]):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "send_ticket_confirmation_email",
            "ticket_id": ticket_id,
            "signed_in": signed_in,
        },
    )
Ejemplo n.º 9
0
def notify(channel: str,
           text: str,
           attachments: list[Any] = None,
           blocks: list[Any] = None):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "notify",
            "channel": channel,
            "text": text,
            **({
                "attachments": attachments
            } if attachments else {}),
            **({
                "blocks": blocks
            } if blocks else {}),
        },
    )