local_tasks.py 917 Bytes
Newer Older
1
from manager.mancelery import celery
Guba Sándor committed
2

3 4
# TODO: Keep synchronised with Instance funcs

Guba Sándor committed
5 6 7 8 9 10

@celery.task
def deploy(instance, user):
    instance.deploy(task_uuid=deploy.request.id, user=user)


11 12 13
@celery.task
def destroy(instance, user):
    instance.destroy(task_uuid=destroy.request.id, user=user)
Guba Sándor committed
14 15


16 17 18
@celery.task
def sleep(instance, user):
    instance.sleep(task_uuid=sleep.request.id, user=user)
Guba Sándor committed
19 20


21 22 23
@celery.task
def wake_up(instance, user):
    instance.wake_up(task_uuid=wake_up.request.id, user=user)
Guba Sándor committed
24 25


26 27 28
@celery.task
def shutdown(instance, user):
    instance.shutdown(task_uuid=shutdown.request.id, user=user)
Guba Sándor committed
29 30


31 32 33
@celery.task
def reset(instance, user):
    instance.reset(task_uuid=reset.request.id, user=user)
Guba Sándor committed
34 35


36 37 38 39
@celery.task
def reboot(instance, user):
    instance.reboot(task_uuid=reboot.request.id, user=user)

Guba Sándor committed
40

41 42 43
@celery.task
def migrate(instance, user):
    instance.migrate(task_uuid=migrate.request.id, user=user)