From 23bfeef5d168666d17343d5484974b7b65db5441 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 28 Mar 2013 17:03:04 -0400 Subject: webapp: Progess bar fixes for many types of special remotes. There was confusion in different parts of the progress bar code about whether an update contained the total number of bytes transferred, or the number of bytes transferred since the last update. One way this bug showed up was progress bars that seemed to stick at zero for a long time. In order to fix it comprehensively, I add a new BytesProcessed data type, that is explicitly a total quantity of bytes, not a delta. Note that this doesn't necessarily fix every problem with progress bars. Particularly, buffering can now cause progress bars to seem to run ahead of transfers, reaching 100% when data is still being uploaded. --- Types/Meters.hs | 12 ------------ Types/Remote.hs | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 Types/Meters.hs (limited to 'Types') diff --git a/Types/Meters.hs b/Types/Meters.hs deleted file mode 100644 index ef304d1ae..000000000 --- a/Types/Meters.hs +++ /dev/null @@ -1,12 +0,0 @@ -{- git-annex meter types - - - - Copyright 2012 Joey Hess - - - - Licensed under the GNU GPL version 3 or higher. - -} - -module Types.Meters where - -{- An action that can be run repeatedly, feeding it the number of - - bytes sent or retrieved so far. -} -type MeterUpdate = (Integer -> IO ()) diff --git a/Types/Remote.hs b/Types/Remote.hs index 64a77109c..e6536757c 100644 --- a/Types/Remote.hs +++ b/Types/Remote.hs @@ -15,9 +15,9 @@ import Data.Ord import qualified Git import Types.Key import Types.UUID -import Types.Meters import Types.GitConfig import Config.Cost +import Utility.Metered type RemoteConfigKey = String type RemoteConfig = M.Map RemoteConfigKey String -- cgit v1.2.3