Skip to content

Commit

Permalink
Merge pull request #268 from duskovesic/CTX-6554
Browse files Browse the repository at this point in the history
CTX-6554: Cleaning the list for uploading artifacts
  • Loading branch information
igorperic17 authored Sep 4, 2024
2 parents 0101428 + eaeaba6 commit 93f49a4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion coretex/_task/worker/artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,16 @@ def on_created(self, event: FileSystemEvent) -> None:
if filePath.name in IGNORED_FILES:
return

logging.getLogger("coretex").debug(f">> [Coretex] File created at path \"{filePath}\", adding to artifacts list")
logging.getLogger("coretexpylib").debug(f">> [Coretex] File created at path \"{filePath}\", adding to artifacts list")
self.artifactPaths.append(filePath)

def on_deleted(self, event: FileSystemEvent) -> None:
filePath = Path(event.src_path)

if filePath in self.artifactPaths:
logging.getLogger("coretexpylib").debug(f">> [Coretex] Deleted file at path \"{filePath}\", removing from artifacts list")
self.artifactPaths.remove(filePath)


@contextmanager
def track(taskRun: TaskRun) -> Iterator[FileEventHandler]:
Expand Down

0 comments on commit 93f49a4

Please sign in to comment.