| 
81 | 81 | @dataclass(slots=True)  | 
82 | 82 | class TaskData:  | 
83 | 83 |     """  | 
84 |  | -    Object to store all data related to a Celery task excecution.  | 
 | 84 | +    Object to store all data related to a Celery task execution.  | 
85 | 85 | 
  | 
86 |  | -    We use this object from inside the task to store data while we are runnig  | 
 | 86 | +    We use this object from inside the task to store data while we are running  | 
87 | 87 |     the task. This is to avoid using `self.` inside the task due to its  | 
88 |  | -    limitations: it's instanciated once and that instance is re-used for all  | 
 | 88 | +    limitations: it's instantiated once and that instance is re-used for all  | 
89 | 89 |     the tasks ran. This could produce sharing instance state between two  | 
90 | 90 |     different and unrelated tasks.  | 
91 | 91 | 
  | 
@@ -418,9 +418,12 @@ def before_start(self, task_id, args, kwargs):  | 
418 | 418 |                 protected_from_scale_in=True,  | 
419 | 419 |             )  | 
420 | 420 | 
 
  | 
421 |  | -        # Clean the build paths completely to avoid conflicts with previous run  | 
422 |  | -        # (e.g. cleanup task failed for some reason)  | 
423 |  | -        clean_build(self.data.version)  | 
 | 421 | +        if self.data.project.has_feature(Feature.BUILD_FULL_CLEAN):  | 
 | 422 | +            # Clean DOCROOT path completely to avoid conflicts other projects  | 
 | 423 | +            clean_build()  | 
 | 424 | +        else:  | 
 | 425 | +            # Clean the build paths for this version to avoid conflicts with previous run  | 
 | 426 | +            clean_build(self.data.version)  | 
424 | 427 | 
 
  | 
425 | 428 |         # NOTE: this is never called. I didn't find anything in the logs, so we  | 
426 | 429 |         # can probably remove it  | 
@@ -558,7 +561,7 @@ def get_valid_artifact_types(self):  | 
558 | 561 | 
  | 
559 | 562 |         TODO: remove the limitation of only 1 file.  | 
560 | 563 |         Add support for multiple PDF files in the output directory and  | 
561 |  | -        grab them by using glob syntaxt between other files that could be garbage.  | 
 | 564 | +        grab them by using glob syntax between other files that could be garbage.  | 
562 | 565 |         """  | 
563 | 566 |         valid_artifacts = []  | 
564 | 567 |         for artifact_type in ARTIFACT_TYPES:  | 
@@ -789,7 +792,7 @@ def update_build(self, state=None):  | 
789 | 792 |             log.exception("Error while updating the build object.", state=state)  | 
790 | 793 | 
 
  | 
791 | 794 |     def execute(self):  | 
792 |  | -        # Clonning  | 
 | 795 | +        # Cloning  | 
793 | 796 |         self.update_build(state=BUILD_STATE_CLONING)  | 
794 | 797 | 
 
  | 
795 | 798 |         # TODO: remove the ``create_vcs_environment`` hack. Ideally, this should be  | 
 | 
0 commit comments