saltstack/salt — Issue #725: Allow for commands to return their job id
Author: fatbox
Created: 2012-02-21 15:23:28+00:00
State: open

Currently there isn't anyway to get the `jid` back when you schedule a job.

The use case is when you have a custom returner and you'd like the call to return immediately on a long running job so that you can then respond to the job status when the returner signals that the job has finished.

For something like this, where `pub` is `minion.functions['publish.publish']`:

```
ret = pub('*', 'cmd.run', 'sleep 30', returner='customreturner', timeout=0)
```

I'd like ret to contain a dict of each minion the job was run on and the jid of the job.