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