mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 20:59:10 +08:00
accounting: fix creating of global stats ignoring the config
Before this change the global stats were created before the global config which meant they ignored the global config completely.
This commit is contained in:
parent
c954c397d9
commit
c2bf300dd8
|
@ -39,6 +39,12 @@ func Start(ctx context.Context) {
|
||||||
|
|
||||||
// Start the transactions per second limiter
|
// Start the transactions per second limiter
|
||||||
StartLimitTPS(ctx)
|
StartLimitTPS(ctx)
|
||||||
|
|
||||||
|
// Set the error count function pointer up in fs
|
||||||
|
//
|
||||||
|
// We can't do this in an init() method as it uses fs.Config
|
||||||
|
// and that isn't set up then.
|
||||||
|
fs.CountError = GlobalStats().Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Account limits and accounts for one transfer
|
// Account limits and accounts for one transfer
|
||||||
|
|
|
@ -17,9 +17,6 @@ var groups *statsGroups
|
||||||
func init() {
|
func init() {
|
||||||
// Init stats container
|
// Init stats container
|
||||||
groups = newStatsGroups()
|
groups = newStatsGroups()
|
||||||
|
|
||||||
// Set the function pointer up in fs
|
|
||||||
fs.CountError = GlobalStats().Error
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func rcListStats(ctx context.Context, in rc.Params) (rc.Params, error) {
|
func rcListStats(ctx context.Context, in rc.Params) (rc.Params, error) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user