Skip to content

Commit

Permalink
reformatted
Browse files Browse the repository at this point in the history
  • Loading branch information
gesinaphillips committed Feb 4, 2025
1 parent 818d316 commit 26ddb04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ def translate_status(self, status: str) -> Job.Status:
pass

@abstractmethod
def launch_job(
self, job: AbstractJob, workspace: Workspace, resource_options: dict
) -> int:
def launch_job(self, job: AbstractJob, workspace: Workspace, resource_options: dict) -> int:
# Should return resource_job_id
pass

Expand All @@ -48,9 +46,7 @@ def validate_options(self, resource_options: dict) -> bool:
validator.validate(resource_options)
if validator.errors:
logging.error(f"Validation errors: {validator.errors}")
raise ValidationException(
f"Invalid resource options found: {validator.errors}"
)
raise ValidationException(f"Invalid resource options found: {validator.errors}")
return validator.is_valid

def translate_option_name(self, option: str) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ def translate_status(self, status):

def launch_job(self, job, workspace, resource_options):
# Need to generate a SLURM token (as a user) to launch a job
workspace_full_path = os.path.join(
self.resource_storage.root_dir, workspace.file_path
)
workspace_full_path = os.path.join(self.resource_storage.root_dir, workspace.file_path)
job_full_path = os.path.join(workspace_full_path, f'.{job.job_details["id"]}')

user_info = self.resource_user_authentication.has_permission(workspace.user_id)
Expand Down Expand Up @@ -186,9 +184,7 @@ def get_job_core_hours(self, job):
return 0

def stop_job(self, job):
user_info = self.resource_user_authentication.has_permission(
job.workspace_id.user_id
)
user_info = self.resource_user_authentication.has_permission(job.workspace_id.user_id)

token = self.get_user_token(user_info)

Expand Down

0 comments on commit 26ddb04

Please sign in to comment.