helper

package
v0.3.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddArrayJobAsSingleJobs

func AddArrayJobAsSingleJobs(jt drmaa2interface.JobTemplate, t jobtracker.JobTracker, begin, end, step int) (string, error)

AddArrayJobAsSingleJobs takes an job array definition and submits single jobs through the AddJob() method of the given job tracker. This function is typically needed when a DRM does not support job arrays natively. The returned array job ID is created from all of the returned job IDs and does not work with the DRM directly.

func ArrayJobID2GUIDs

func ArrayJobID2GUIDs(id string) ([]string, error)

ArrayJobID2GUIDs converts the array job ID returned from the AddArrayJobAsSingleJobs.

func GetJobTemplateFromBase64 added in v0.3.33

func GetJobTemplateFromBase64(base64encondedJT string) (drmaa2interface.JobTemplate, error)

GetJobTemplateFromBase64 decodes a base64 encoded job template and returns the job template object.

func Guids2ArrayJobID

func Guids2ArrayJobID(guids []string) string

Guids2ArrayJobID creates an array job ID out of the given single job IDs.

func IsInExpectedState

func IsInExpectedState(state drmaa2interface.JobState, states ...drmaa2interface.JobState) bool

IsInExpectedState checks if state is in one of the given states.

func JobTemplateToBase64 added in v0.3.33

func JobTemplateToBase64(jt drmaa2interface.JobTemplate) (string, error)

JobTemplateToBase64 encodes a job template to base64 encoded string.

func WaitForState

func WaitForState(jt jobtracker.JobTracker, jobid string, timeout time.Duration, states ...drmaa2interface.JobState) error

WaitForState blocks until job is in any of the given states or a timeout happens. It checks the job state every 100 ms.

func WaitForStateWithInterval added in v0.2.4

func WaitForStateWithInterval(jt jobtracker.JobTracker, interval time.Duration, jobid string,
	timeout time.Duration, states ...drmaa2interface.JobState) error

WaitForStateWithInterval blocks until the job is any of the given states or a timeout happens. The time interval for job state check calls is given as parameter.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL