Zum Inhalt

Aufträge

Aufträge in der QFieldCloud führen umfangreiche Operationen mit Projektdateien und Layern innerhalb von QGIS durch. Jobs werden als Reaktion auf bestimmte Benutzeraktionen erstellt.

Once a job is created, it is added to the project's job queue and waits for available QFieldCloud resources to run. At any given moment only one job can run per project. The rest of the queued jobs will perform in the same order as in they entered the queue.

Each job consists of one or more steps and each step is responsible for one self contained task on the project. QFieldCloud supports three predefined job workflows: process_projectfile, package and delta_apply.

Während der Ausführung schreiben Aufträge Protokollmeldungen, die auf der Auftrags-Projektseite für Aufträge mit dem Status BEENDET oder FEHLGESCHLAGEN zu finden sind.

Aufträge haben Zugriff auf Projektgeheimnisse.

Anmerkung

Alle Aufträge können über die QFieldCloud API ausgelöst werden.

Warnung

  • Jede der auf dieser Seite beschriebenen Auslösebedingungen kann sich ohne vorherige Ankündigung ändern.
  • Alle Aufträge müssen innerhalb von 10 Minuten abgeschlossen werden, da sie sonst zu einem Zeitüberschreitungsfehler führen und beendet werden.

Info

If you are looking for technical details how Jobs work, check the Job Queue documentation.

Auftragsarten

Projektdatei verarbeiten (process_projectfile)

The process project file job is used to extract details about the project configuration and project layers including QGIS version used, project CRS, layer CRS, layer names, layer validity etc. QFieldCloud validates the uploaded QGIS project file (.qgs/.qgz), as well as the supporting GeoPackages, TIFFs and other data source files. It also validates remote connections to PostGIS, WFS, WMS and other online data sources. QFieldCloud will open the project file in a QGIS instance on the server to extract all the necessary information.

Auslöser

Dieser Job wird jedes Mal ausgelöst, wenn eine Datei in QFieldCloud hochgeladen wird, es sei denn, mindestens eine der folgenden Bedingungen ist gültig:

  • Es wurde noch keine QGIS-Projektdatei (.qgs/.qgz) hochgeladen.
  • The uploaded file is within the DCIM directory. Those files are assumed to be irrelevant to project validity.
  • Es gibt bereits einen Projektdatei_verarbeiten-Auftrag im ANSTEHEND-Status.

Problemlösung

A process_projectfile job might result in FAILED status. Check the non-exhaustive list of causes below:

  • The uploaded QGIS project file (.qgs/.qgz) is unreadable, incomplete, broken or wrong. Try to reupload the QGIS project file.
  • QGIS is crashing after opening the project file.
  • Try to identify the layer that is causing the crash by removing one layer at a time from the project and reuploading the QGIS project file.

Note

Even if a process_projectfile job results in a SUCCESS status, it does not mean the project is properly configured. The SUCCESS status just states the project has been successfully opened and all the needed information has been extracted.

Paket (package)-Auftrag

The package job converts a QGIS project to a QField project, the same way it is done on QGIS via QFieldSync. The package job will prepare all layers marked as "Offline editing" to a single GeoPackage.

Auslöser

This job is triggered every time the Download or Synchronize buttons are pressed on QField. Unless at least one of the following condition are valid:

  • Das Projekt hat noch nie einen Projektdatei_verarbeiten-Auftrag ausgeführt , der zu einem ERFOLG-Status geführt hat.
  • Es gibt bereits einen Paket-Auftrag im ANSTEHEND-Status.
  • Das Projekt enthält keine Online-Vektorlayer (PostGIS, WFS usw.) oder das letzte Paket-Auftragsergebnis war ERFOLG und es gab keine Datei-Uploads oder Änderungs-Uploads.

Problemlösung

A package job might result in FAILED status. Check the non-exhaustive list of causes below:

  • Das Projekt hat noch nie einen Projektdatei_verarbeiten-Auftrag ausgeführt , der zu einem ERFOLG-Status geführt hat.
  • Some of the project layers are inaccessible from QFieldCloud.
  • Make sure all files are uploaded and all credentials to online layers (PostGIS, WFS etc) are stored within the QGIS project file.

(Delta_anwenden)-Auftrag

Delta_anwenden-Aufträge sind dafür verantwortlich, alle gepushten QField-Änderungen dauerhaft zu speichern.

Auslöser

This job is triggered every time a Synchronize or Push changes button is pressed on QField, or Apply pending changes button is pressed on the Changes project page. If any of the following condition are valid:

  • Das Projekt hat nie einen Projektdatei_verarbeiten-Auftrag ausgeführt, der zu einem ERFOLG-Status geführt hat.
  • Es gibt bereits einen Delta_anwenden-Auftrag im ANSTEHEND-Status.

Problemlösung

A delta_apply job might result in FAILED status. Check the non-exhaustive list of causes below:

  • Mindestens eine der im QGIS-Projekt verwendeten Online-Datenbanken (PostGIS/WFS) hat die Verbindung zurückgesetzt.
  • Das Projekt ist zu groß und der Auftrag konnte nicht ausgeführt werden.
  • There are hidden files and directories within the project that are preventing the normal work of QFieldCloud.
  • Hidden files and directories are those starting with a leading dot (.).
Understanding conflicts delta_apply jobs

Conflicts can occur under the following conditions:

  1. Two or more users modify the geometry or a specific attribute of the same feature, starting from the same initial value but saving different values.
  2. A primary key is used more than once.

To minimize the risk of conflicts, follow these best practices:

  • Plan updates collaboratively - When updating features based on specific field conditions, assign each user a distinct set of features to edit.
  • Clear planning reduces overlap and potential conflicts.
  • Avoid modifying primary keys - Primary keys should be treated as immutable and configured to be read-only.
  • This ensures consistent identification of features and prevents accidental modifications.
  • Ensure unique primary keys - Use a truly unique primary key, such as a UUID (uuid()), to prevent conflicts and ensure data integrity.

By implementing these practices, you can significantly reduce the likelihood of conflicts and maintain consistent data.

How to resolve conflicts?

By default, QFieldCloud overwrites conflicts using a last wins policy (the latest patch of changes to the attribute(s) involved in the conflict replaces all earlier patches of changes to these attributes). Alternatively, admins can set a project's conflict resolution policy to manual. Doing so will require the project manager to manually resolve conflicts, picking those to be applied to the project.

  1. Navigieren Sie zum Abschnitt "Änderungen".
  2. Filter the changes with the "CONFLICT" status.
  3. Wählen Sie jede konfliktbehaftete Änderung aus und setzen Sie den Status im Dropdown-Menü "Aktion" auf "Neu anwenden". Wenn alle neuen Änderungen in Konflikt stehen, können Sie alternativ die letzte konfliktbehaftete Änderung auswählen und "Diese und neuere Änderungen anwenden" wählen.
  4. Überprüfen Sie die Details der Änderungen im Konflikt und klicken Sie am Ende der Seite auf "Alles speichern".

Änderungen in QFieldCloud erneut anwenden
  1. Klicken Sie unter Meine Projekte auf den Namen des Projekts.
  2. Gehen Sie zum Abschnitt Änderungen. (Änderungen werden von den neuesten bis zu den ältesten sortiert).
  3. Suchen Sie nach den Änderungen, die Sie erneut anwenden möchten.
  4. Klicken Sie auf der rechten Seite in der Spalte Aktion auf die Dropdown-Liste.
  5. Wählen Sie die gewünschte Aktion aus, um die Änderungen erneut anzuwenden.

    • Bestimmte Änderungen erneut anwenden: Wenn Sie bestimmte Änderungen erneut anwenden müssen, wählen Sie jede Änderung aus, die Sie erneut anwenden möchten, und klicken Sie auf Erneut anwenden.
    • Letzte Änderungen erneut anwenden: Wenn Sie es vorziehen, die letzten Änderungen am Projekt erneut anzuwenden, geben Sie die ursprüngliche Änderung an, die Sie wiederherstellen möchten, und wählen Sie dann Diese und neuere Änderungen erneut anwenden aus.

Klicken Sie abschließend auf die Schaltfläche Alle speichern.

Änderungen erneut anwenden
Änderungen erneut anwenden

Problembehandlung bei Auftragsprotokollen

Beim Ausführen eines Auftrags finden Sie in den Protokollen in der Regel einen Schritt mit dem Namen "Projektlayer überprüfen", der eine Tabelle mit allen Projektlayern und ihrem Status daneben druckt.

Die möglichen Status sind:

  • ok - Der Layer wird korrekt in die QFieldCloud geladen.
  • ungültiger_Datenanbieter – Der Datenanbieter des Layers ist ungültig. In der Regel werden zusätzliche Informationen in der "Anbieterübersicht" angezeigt.
  • ungültiger_Layer  - Dieser Fehler sollte sehr selten, wenn überhaupt, auftreten. Die Daten werden korrekt geladen, aber aus irgendeinem Grund meldet QGIS den Layer als ungültig.

Es kann keine Verbindung zum Dienst "{SERVICE}" hergestellt werden

QFieldCloud tries to connect to a PostgreSQL service that is not available. You should need to create a new pgservice secrets so QFieldCloud can connect to the PostgreSQL service.

Es kann keine Verbindung zum Host "{HOST}" hergestellt werden.

QFieldCloud cannot establish a connection to the given {HOST}. Your service is not accessible from the QFieldCloud server. You might been to ask your IT department to whitelist the QFieldCloud IP.

Es kann keine Verbindung zum Host "localhost" hergestellt werden.

You have uploaded a layer that connects to a database/service on your local machine. Either remove that layer or replace it with a layer source accessible by QFieldCloud.

Datei "{FILENAME}" fehlt.

The file {FILENAME} (e.g. /tmp/rndstr/files/data.gpkg) is not found on the QFieldCloud server and cannot be opened. There are two things that should be checked:

  • Whether the file has been uploaded to the cloud. You can check this in Project Settings -> Files page on QFieldCloud or QFieldSync.
  • Making sure the file is uploaded with the same relative path as on your PC. Please note that all project files should be within the same project directory or subdirectory as the .qgs/.qgz QGIS project file. Please also note the directory names should be preserved too, for example if a file is stored in data/data.gpkg, make sure the data directory exists on QFieldCloud too.