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).
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.