コード例 #1
0
ファイル: notification.py プロジェクト: zhill/quay
def delete_all_notifications_by_kind(kind_name):
    kind_ref = NotificationKind.get(name=kind_name)
    (Notification.delete().where(Notification.kind == kind_ref).execute())
コード例 #2
0
ファイル: notification.py プロジェクト: zhill/quay
def delete_notifications_by_kind(target, kind_name):
    kind_ref = NotificationKind.get(name=kind_name)
    Notification.delete().where(Notification.target == target,
                                Notification.kind == kind_ref).execute()
コード例 #3
0
ファイル: notification.py プロジェクト: zhill/quay
def delete_all_notifications_by_path_prefix(prefix):
    (Notification.delete().where(Notification.lookup_path**(prefix +
                                                            "%")).execute())