mpeltriaux
7689e0b80d
* finishes egon compatible (tested) data export * moves egon export into celery process * adds export of data in case of intervention recording * adds _RABBITMQ_ settings for intervention/settings.py * adds new dependency for requirements.txt
19 lines
533 B
Python
19 lines
533 B
Python
"""
|
|
Author: Michel Peltriaux
|
|
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
|
|
Contact: michel.peltriaux@sgdnord.rlp.de
|
|
Created on: 21.03.22
|
|
|
|
"""
|
|
from celery import shared_task
|
|
|
|
from intervention.utils.egon_export import EgonExporter
|
|
|
|
|
|
@shared_task
|
|
def celery_export_to_egon(intervention_id: str):
|
|
from intervention.models import Intervention
|
|
intervention = Intervention.objects.get(id=intervention_id)
|
|
egon_exporter = EgonExporter(intervention)
|
|
egon_exporter.export_to_rabbitmq()
|