Commit Graph

2 Commits

Author SHA1 Message Date
David Anderson 3e903d0e36 Remote job submission was always using allocation-based prioritization.
This is not necessarily the right thing.
For example, nanoHUB submits batches of jobs that are mixtures
of speculative and user-submitted;
these simply need to be given low and high priorities.

The way things work now:
- if you want allocation-based prioritization,
    set the "allocation_priority" flag in the request object
    (Python or PHP API)
- or set the "priority" field in the request object;
    that sets the priority of all the jobs in the batch
- or set the "priority" field of jobs in the batch.

Updated wiki docs accordingly.

Also fixed a bug in the test script
(note to self: adding an object to an array adds a reference, not a copy).
2020-07-24 00:36:12 -07:00
David Anderson c56f284904 remote job submission: improve error handling.
The way errors were being handled in submit_rpc_handler.php,
the replies could end up looking like:
<error>
    ...
    </error>
<actual_reply>
    ...
</actual_reply>

which doesn't parse with PHP's simplexml because there's no outer element.
So the PHP interface to job submission didn't work in some cases.

To fix this, I changed the RPC replies to have an enclosing element,
which is the name of the RPC, e.g.
<submit_batch>
    <error>
        ...
    </error>
    ... other stuff
</submit_batch>

RPC replies should now always be valid XML, errors or not.
2016-07-31 23:00:24 -07:00