Exemple #1
0
def subscribe_to_main_list(email: str):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "subscribe_to_main_list",
            "email": email
        },
    )
Exemple #2
0
def export_event_to_google(event_pk: int):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "export_event_to_google",
            "event_pk": event_pk
        },
    )
Exemple #3
0
def send_new_ticket_email(ticket: models.Ticket):
    channel_send(
        WORKER_CHANNEL,
        {
            "type": "send_new_ticket_email",
            "ticket_id": ticket.id,
        },
    )
Exemple #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
        },
    )
Exemple #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,
        },
    )
Exemple #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,
        },
    )
Exemple #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,
        },
    )
Exemple #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,
        },
    )
Exemple #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 {}),
        },
    )