mirror of
https://github.com/rclone/rclone
synced 2024-11-24 01:26:25 +01: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
|
||||
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
|
||||
|
@ -17,9 +17,6 @@ var groups *statsGroups
|
||||
func init() {
|
||||
// Init stats container
|
||||
groups = newStatsGroups()
|
||||
|
||||
// Set the function pointer up in fs
|
||||
fs.CountError = GlobalStats().Error
|
||||
}
|
||||
|
||||
func rcListStats(ctx context.Context, in rc.Params) (rc.Params, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user