The original version of this document is located at https://docs.qfield.org/reference/qfieldcloud/jobs
Jobs on QFieldCloud perform heavy operation with project files and layers within QGIS. Jobs are created in response to certain user actions.
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
.
While running, jobs are writing log messages which are available on project’s jobs page for jobs that have reached a final status FINISHED
or FAILED
.
Jobs have access to project secrets.
Note
All jobs can be triggered using the QFieldCloud API.
Warning
Info
If you are looking for technical details how Jobs work, check the Job Queue documentation.
process_projectfile
) jobThe process project file job is used to extract details about the project configuration and project layers, such as project CRS, layer CRS, layer name, 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 connection 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.
This job is triggered every time a file is uploaded to QFieldCloud, unless at least one of the following condition are valid:
.qgs
/.qgz
) has been uploaded yet.DCIM
directory. Those files are assumed to be irrelevant to project validity.process_projectfile
job in PENDING
status.A process_projectfile
job might result in FAILED
status. Check the non-exhaustive list of causes below:
.qgs
/.qgz
) is unreadable, incomplete, broken or wrong. Try to reupload 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.
package
) jobThe package
job convert 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.
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:
process_projectfile
job that resulted in SUCCESS
status.package
job in PENDING
status.package
job result was SUCCESS
and there were no file uploads, nor change uploads.A package
job might result in FAILED
status. Check the non-exhaustive list of causes below:
process_projectfile
job that resulted in SUCCESS
status.delta_apply
) jobDelta apply jobs is responsible to make all pushed QField changes permanent.
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:
process_projectfile
job that resulted in SUCCESS
status.delta_apply
job in PENDING
status.A delta_apply
job might result in FAILED
status. Check the non-exhaustive list of causes below:
.
).delta_apply
jobsConflicts can occur under the following conditions:
To minimize the risk of conflicts, follow these best practices:
uuid()
), to prevent conflicts and ensure data integrity.By implementing these practices, you can significantly reduce the likelihood of conflicts and maintain consistent data.
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.
Choose the desired action to reapply the changes.
Finally, click the Save all button.
When running a job, usually you can find a step in the logs called “Check project layers” that prints a table with all the project layers and status next to them.
The possible statuses are:
{SERVICE}
”.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 PostGIS service.
{HOST}
”.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.
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.
{FILENAME}
” missing.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:
.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.