1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

rc: correct names of parameters in job/list output

These were accidentally committed as snake_case whereas we use
camelCase elsewhere.

This corrects the issue before the first release in v1.72.0
This commit is contained in:
Nick Craig-Wood
2025-11-20 15:47:51 +00:00
parent e451f9c999
commit 4eccc40168
2 changed files with 6 additions and 6 deletions

View File

@@ -430,8 +430,8 @@ Results:
- executeId - string id of rclone executing (change after restart)
- jobids - array of integer job ids (starting at 1 on each restart)
- running_ids - array of integer job ids that are running
- finished_ids - array of integer job ids that are finished
- runningIds - array of integer job ids that are running
- finishedIds - array of integer job ids that are finished
`,
})
}
@@ -441,8 +441,8 @@ func rcJobList(ctx context.Context, in rc.Params) (out rc.Params, err error) {
out = make(rc.Params)
out["jobids"] = running.IDs()
runningIDs, finishedIDs := running.Stats()
out["running_ids"] = runningIDs
out["finished_ids"] = finishedIDs
out["runningIds"] = runningIDs
out["finishedIds"] = finishedIDs
out["executeId"] = executeID
return out, nil
}

View File

@@ -394,8 +394,8 @@ func TestRcJobList(t *testing.T) {
require.NotNil(t, out1)
assert.Equal(t, executeID, out1["executeId"], "should have executeId")
assert.Equal(t, []int64{1}, out1["jobids"], "should have job listed")
assert.Equal(t, []int64{1}, out1["running_ids"], "should have running job")
assert.Equal(t, []int64{}, out1["finished_ids"], "should not have finished job")
assert.Equal(t, []int64{1}, out1["runningIds"], "should have running job")
assert.Equal(t, []int64{}, out1["finishedIds"], "should not have finished job")
_, _, err = NewJob(ctx, longFn, rc.Params{"_async": true})
assert.NoError(t, err)