#55 Celery parcel updating

* adds celery to project
* adds celery background task for updating parcels
* adds parcel calculation to creating of new geometries as well
* tests outstanding!!!
This commit is contained in:
2022-01-06 12:08:38 +01:00
parent 193995c625
commit a282d8dfaf
13 changed files with 506 additions and 81 deletions

View File

@@ -11,7 +11,7 @@ import requests
from django.contrib.auth.models import User
from django.utils.translation import gettext_lazy as _
from konova.settings import SSO_SERVER_BASE, SSO_PUBLIC_KEY
from konova.settings import SSO_SERVER_BASE, SSO_PUBLIC_KEY, PROXIES
from konova.sub_settings.context_settings import BASE_TITLE_SHORT
@@ -52,7 +52,8 @@ class Messenger:
requests.post(
self.server_url,
data=data,
headers=headers
headers=headers,
proxies=PROXIES
)
def send_object_checked(self, obj_identifier: str, performing_user: User, detail_view_url: str = ""):

View File

@@ -12,7 +12,7 @@ import xmltodict
from django.contrib.gis.db.models.functions import AsGML, Transform
from requests.auth import HTTPDigestAuth
from konova.settings import DEFAULT_SRID_RLP, PARCEL_WFS_USER, PARCEL_WFS_PW
from konova.settings import DEFAULT_SRID_RLP, PARCEL_WFS_USER, PARCEL_WFS_PW, PROXIES
class AbstractWFSFetcher:
@@ -148,7 +148,8 @@ class ParcelWFSFetcher(AbstractWFSFetcher):
response = requests.post(
url=self.base_url,
data=post_body,
auth=self.auth_digest_obj
auth=self.auth_digest_obj,
proxies=PROXIES,
)
content = response.content.decode("utf-8")