Skip to content

Commit 04bf260

Browse files
committed
fix(worker): make the delta_apply jobs to be runnable again
1 parent 254665b commit 04bf260

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docker-app/qfieldcloud/core/management/commands/dequeue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from django.db.models import Q
1111
from qfieldcloud.core.models import Job
1212
from worker_wrapper.wrapper import (
13-
DeltaApplyJobRun,
13+
ApplyDeltaJobRun,
1414
JobRun,
1515
PackageJobRun,
1616
ProcessProjectfileJobRun,
@@ -117,7 +117,7 @@ def handle(
117117
def _run(self, job: Job) -> None:
118118
job_run_classes: dict[Job.Type, type[JobRun]] = {
119119
Job.Type.PACKAGE: PackageJobRun,
120-
Job.Type.DELTA_APPLY: DeltaApplyJobRun,
120+
Job.Type.DELTA_APPLY: ApplyDeltaJobRun,
121121
Job.Type.PROCESS_PROJECTFILE: ProcessProjectfileJobRun,
122122
}
123123

docker-app/worker_wrapper/wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,9 @@ def after_docker_run(self) -> None:
450450
packages.delete_obsolete_packages(projects=[self.job.project])
451451

452452

453-
class DeltaApplyJobRun(JobRun):
453+
class ApplyDeltaJobRun(JobRun):
454454
job_class = ApplyJob
455-
command = ["delta_apply", "%(project__id)s", "%(project__the_qgis_file_name)s"]
455+
command = ["apply_deltas", "%(project__id)s", "%(project__the_qgis_file_name)s"]
456456

457457
def __init__(self, job_id: str) -> None:
458458
super().__init__(job_id)

docker-qgis/qfc_worker/commands/apply_deltas.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,17 +1173,17 @@ def add_arguments(self, parser: argparse.ArgumentParser) -> None:
11731173
help="Inverses the direction of the deltas. Makes the delta `old` to `new` and `new` to `old`. Mainly used to rollback the applied changes using the same delta file..",
11741174
)
11751175
parser.add_argument(
1176-
"--delta-filename",
1176+
"--delta-file",
11771177
type=str,
11781178
default="/io/deltafile.json",
11791179
help="Path to the delta file JSON file",
11801180
)
1181-
parser.add_argument("--delta-log", type=str, help="Path to delta log file")
11821181

11831182
def handle( # type: ignore
11841183
self,
11851184
project_id: UUID,
11861185
project_file: str,
1186+
delta_file: str,
11871187
overwrite_conflicts: bool,
11881188
inverse: bool,
11891189
) -> None:
@@ -1214,7 +1214,7 @@ def handle( # type: ignore
12141214
name="Apply Deltas",
12151215
arguments={
12161216
"the_qgis_file_name": WorkDirPath("files", project_file),
1217-
"delta_filename": "/io/deltafile.json",
1217+
"delta_filename": delta_file,
12181218
"inverse": inverse,
12191219
"overwrite_conflicts": overwrite_conflicts,
12201220
},

0 commit comments

Comments
 (0)