tasks.py 774 Bytes
Newer Older
1
from celery import shared_task
2

3 4 5
from .task_resources import common
from .task_resources import tunnel_credit
from .task_resources import tunnel_subscription
6 7 8


@shared_task
9
def tunnel_refresh_subscription():
10
    tunnel_subscription.monitor_woosub1_renewals()
11 12


13 14
@shared_task
def tunnel_new_subscription():
15
    tunnel_subscription.monitor_woosub1_new_subscriptions()
16

David Seaward's avatar
David Seaward committed
17

18 19 20
@shared_task
def tunnel_new_credit():
    tunnel_credit.monitor_woo1()
21 22


23 24
@shared_task
def deactivate_all_expired_limits():
25
    common.deactivate_all_expired_limits()
26 27


28
@shared_task
David Seaward's avatar
David Seaward committed
29
def debug_connection_task():
30
    common.debug_connection_task()
31 32 33 34 35 36 37


@shared_task
def monitor_woo1():
    # keep legacy task header so that it is flushed out of queue
    # FIXME: this will be removed in the next release
    pass