Skip to content

Commit

Permalink
backend: create only one storage object per project
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Jun 24, 2024
1 parent 7aea0d1 commit 06d270a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions backend/copr_backend/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ def run(self):
result = BackendResultEnum("success")

for project_dirname in project_dirnames:
# Fake a Job interface
# So far it has been useful to pass `Job` objects to all storage
# methods. Unfortunatelly jobs represent only builds and not
# actions for which the interface is different. Until we better
# know what we want, I am faking the Job interface.
job = Munch(data)
job.project_owner = data["ownername"]
job.project_name = project_dirname
job.uses_devel_repo = data["devel"]
storage = storage_for_job(job, self.opts, self.log)

for chroot in chroots:
# Fake a Job interface
# So far it has been useful to pass `Job` objects to all storage
# methods. Unfortunatelly jobs represent only builds and not
# actions for which the interface is different. Until we better
# know what we want, I am faking the Job interface.
job = Munch(data)
job.project_owner = data["ownername"]
job.project_name = project_dirname
job.chroot = chroot
job.uses_devel_repo = data["devel"]

storage = storage_for_job(job, self.opts, self.log)
success = storage.init_project(job)
if not success:
result = BackendResultEnum("failure")
Expand Down

0 comments on commit 06d270a

Please sign in to comment.