make priority work
Former-commit-id: 391257fb17ccb7c71c8ab5ba231af5f234e1602d
This commit is contained in:
parent
cd86e4702b
commit
c5a165cfe3
@ -51,7 +51,7 @@ fn request_job(shared: State<SharedState>) -> Result<Json<Value>, NotFound<Strin
|
|||||||
.filter(|x| x.status == EStatus::Queued).cloned()
|
.filter(|x| x.status == EStatus::Queued).cloned()
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
list.sort_by(|a, b| b.description.length.cmp(&a.description.length));
|
list.sort_by(|a, b| (b.description.priority, b.description.length).cmp(&(a.description.priority, a.description.length)));
|
||||||
|
|
||||||
let job = list.get(0);
|
let job = list.get(0);
|
||||||
|
|
||||||
|
7
test.sh
7
test.sh
@ -13,14 +13,15 @@ curl "$base_url"/add_job -X POST -H "Content-Type: application/json" -d \
|
|||||||
{
|
{
|
||||||
"file_url": "https://pomf.dodsorf.as/f/vz9dtl.mkv",
|
"file_url": "https://pomf.dodsorf.as/f/vz9dtl.mkv",
|
||||||
"file_name": "014",
|
"file_name": "014",
|
||||||
"priority": 0,
|
"priority": 15,
|
||||||
"length": 20,
|
"length": 90,
|
||||||
"resolution": [540, 960],
|
"resolution": [540, 960],
|
||||||
"options": {
|
"options": {
|
||||||
"aomenc": "--lag-in-frames=25 --tile-columns=0 --tile-rows=0 --enable-fwd-kf=1 --bit-depth=10 --cpu-used=0 --end-usage=vbr --target-bitrate=60 --kf-min-dist=9999 --kf-max-dist=9999",
|
"aomenc": "--lag-in-frames=25 --tile-columns=0 --tile-rows=0 --enable-fwd-kf=1 --bit-depth=10 --cpu-used=0 --end-usage=vbr --target-bitrate=60 --kf-min-dist=9999 --kf-max-dist=9999",
|
||||||
"ffmpeg": "",
|
"ffmpeg": "",
|
||||||
"two_pass": true,
|
"two_pass": true,
|
||||||
"pix_fmt": "YV12"
|
"pix_fmt": "YV12",
|
||||||
|
"fps": [24000, 1001]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
|
Loading…
Reference in New Issue
Block a user