wireguard/celery fixes
This commit is contained in:
parent
b3626369a2
commit
2e6c72c093
3 changed files with 14 additions and 11 deletions
|
|
@ -20,7 +20,12 @@ def configure_wireguard_server(wireguardvpnpool):
|
|||
server = wireguardvpnpool.vpn_server_hostname
|
||||
|
||||
print(f"Configuring VPN server {server}")
|
||||
cdist_configure_wireguard_server(config, server)
|
||||
#res = cdist_configure_wireguard_server.delay(config, server)
|
||||
res = cdist_configure_wireguard_server.apply_async((config, server), queue='cdist')
|
||||
|
||||
print(f"res={res}")
|
||||
res2= res.get()
|
||||
print(f"res2={res2}")
|
||||
|
||||
|
||||
@shared_task
|
||||
|
|
@ -33,5 +38,9 @@ def cdist_configure_wireguard_server(config, server):
|
|||
|
||||
fname = f"/home/app/.cdist/type/__ungleich_wireguard/files/{server}"
|
||||
|
||||
print(os.uname())
|
||||
with open(fname, "w") as fd:
|
||||
fd.write(config)
|
||||
|
||||
|
||||
return "All good"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue