Skip to content

Commit

Permalink
feat!: pass along JobBundlePurpose in bundle creation callback.
Browse files Browse the repository at this point in the history
Signed-off-by: Ramon Montoya Vozmediano <1171039+rmv@users.noreply.github.com>
  • Loading branch information
rmv committed Nov 7, 2023
1 parent 1139eb8 commit 54f7228
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/deadline/client/ui/dialogs/submit_job_to_deadline_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from ..widgets.host_requirements_tab import HostRequirementsWidget
from . import DeadlineConfigDialog, DeadlineLoginDialog
from ...job_bundle.submission import AssetReferences
from ._types import JobBundlePurpose

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -350,11 +351,17 @@ def on_export_bundle(self):
queue_parameters,
asset_references,
requirements,
purpose=JobBundlePurpose.EXPORT,
)
else:
# Maintaining backward compatibility for submitters that do not support host_requirements yet
self.on_create_job_bundle_callback(
self, job_history_bundle_dir, settings, queue_parameters, asset_references
self,
job_history_bundle_dir,
settings,
queue_parameters,
asset_references,
purpose=JobBundlePurpose.EXPORT,
)

logger.info(f"Saved the submission as a job bundle: {job_history_bundle_dir}")
Expand Down Expand Up @@ -407,11 +414,17 @@ def on_submit(self):
queue_parameters,
asset_references,
requirements,
purpose=JobBundlePurpose.SUBMISSION,
)
else:
# Maintaining backward compatibility for submitters that do not support host_requirements yet
self.on_create_job_bundle_callback(
self, job_history_bundle_dir, settings, queue_parameters, asset_references
self,
job_history_bundle_dir,
settings,
queue_parameters,
asset_references,
purpose=JobBundlePurpose.SUBMISSION,
)

farm_id = get_setting("defaults.farm_id")
Expand Down

0 comments on commit 54f7228

Please sign in to comment.