Versions Compared

    Key

    • This line was added.
    • This line was removed.
    • Formatting was changed.
    Comment: Published by Scroll Versions from this space and version 6.9-0

    A Qube job has a "kind" parameter; this is a string which can be set to any value the user desires.  

    It's mostly used to say "Only run one of this kind of a job on a worker at once".  This tells the queuing system to filter out all hosts which have this kind of job already running.

    When you submit a job, you can do this to keep only one of your job's kind on a host:

    WranglerView / ArtistView submission example:

    • set the job's kind to myKind (or any other value you want)
    • set the job's requirements to not(job.kind in host.duty)

    Command-line examples:

    qbsub  --kind myKind --requirements "not(job.kind in host.duty.kind)" ...

    The cool thing is you can do it with jobtypes as well: (only run 1 myCustomJobType job on a worker at once)

    qbsub --type myCustomJobType --requirements "not(host.duty.type has myCustomJobType)" ...

    API example:

    Code Block
    job = {
        'prototype': 'cmdline',
        'package': {'cmdline': 'sleep 30'},
        'name': 'testing the job kind',
        'kind': 'test',
        'requirements': 'not(job.kind in host.duty.kind)'
    }