Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

rc: correct names of parameters in job/list output

Nick Craig-Wood4eccc4016859
diff --git a/fs/rc/jobs/job.go b/fs/rc/jobs/job.go
index 2dfcf4000..a8d84d126 100644
--- a/fs/rc/jobs/job.go
+++ b/fs/rc/jobs/job.go
@@ -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
}
diff --git a/fs/rc/jobs/job_test.go b/fs/rc/jobs/job_test.go
index 7a3d45e09..e8548fcee 100644
--- a/fs/rc/jobs/job_test.go
+++ b/fs/rc/jobs/job_test.go
@@ -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)