forked from uncloud/uncloud
- Added PricingPlan Model
- Implement a complete cycle for buying a Matrix Chat Host - Refactor the Payement cycle and stripe related methods
This commit is contained in:
parent
e205d8d07c
commit
b7aa1c6971
81 changed files with 5079 additions and 810 deletions
|
|
@ -1,17 +1,14 @@
|
|||
from celery import shared_task
|
||||
from .models import *
|
||||
|
||||
from uncloud.models import UncloudTask
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import logging
|
||||
import uuid
|
||||
|
||||
from django_q.tasks import async_task, result
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@shared_task
|
||||
|
||||
def configure_wireguard_server_on_host(wg_name, config):
|
||||
"""
|
||||
- Create wireguard config (DB query -> string)
|
||||
|
|
@ -47,11 +44,9 @@ def configure_wireguard_server_via_cdist(wireguardvpnpool):
|
|||
|
||||
log.info(f"Configuring VPN server {server} (async)")
|
||||
|
||||
task_id = uuid.UUID(cdist_configure_wireguard_server.apply_async((config, server)).id)
|
||||
UncloudTask.objects.create(task_id=task_id)
|
||||
async_task(cdist_configure_wireguard_server,config, server).id
|
||||
|
||||
|
||||
@shared_task
|
||||
def cdist_configure_wireguard_server(config, server):
|
||||
"""
|
||||
Create config and configure server.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue