@@ -215,10 +215,6 @@ pub struct Server {
215
215
/// Size for local cache
216
216
pub local_cache_size : u64 ,
217
217
218
- /// Interval in seconds after which uncommited data would be
219
- /// uploaded to the storage platform.
220
- pub upload_interval : u64 ,
221
-
222
218
/// Username for the basic authentication on the server
223
219
pub username : String ,
224
220
@@ -284,10 +280,6 @@ impl FromArgMatches for Server {
284
280
. get_one :: < u64 > ( Self :: CACHE_SIZE )
285
281
. cloned ( )
286
282
. expect ( "default value for cache size" ) ;
287
- self . upload_interval = m
288
- . get_one :: < u64 > ( Self :: UPLOAD_INTERVAL )
289
- . cloned ( )
290
- . expect ( "default value for upload" ) ;
291
283
self . username = m
292
284
. get_one :: < String > ( Self :: USERNAME )
293
285
. cloned ( )
@@ -381,7 +373,6 @@ impl Server {
381
373
pub const STAGING : & ' static str = "local-staging-path" ;
382
374
pub const CACHE : & ' static str = "cache-path" ;
383
375
pub const CACHE_SIZE : & ' static str = "cache-size" ;
384
- pub const UPLOAD_INTERVAL : & ' static str = "upload-interval" ;
385
376
pub const USERNAME : & ' static str = "username" ;
386
377
pub const PASSWORD : & ' static str = "password" ;
387
378
pub const CHECK_UPDATE : & ' static str = "check-update" ;
@@ -467,16 +458,6 @@ impl Server {
467
458
. help ( "Maximum allowed cache size for all streams combined (In human readable format, e.g 1GiB, 2GiB, 100MB)" )
468
459
. next_line_help ( true ) ,
469
460
)
470
- . arg (
471
- Arg :: new ( Self :: UPLOAD_INTERVAL )
472
- . long ( Self :: UPLOAD_INTERVAL )
473
- . env ( "P_STORAGE_UPLOAD_INTERVAL" )
474
- . value_name ( "SECONDS" )
475
- . default_value ( "60" )
476
- . value_parser ( validation:: upload_interval)
477
- . help ( "Interval in seconds after which staging data would be sent to the storage" )
478
- . next_line_help ( true ) ,
479
- )
480
461
. arg (
481
462
Arg :: new ( Self :: USERNAME )
482
463
. long ( Self :: USERNAME )
@@ -677,7 +658,6 @@ pub mod validation {
677
658
use path_clean:: PathClean ;
678
659
679
660
use crate :: option:: MIN_CACHE_SIZE_BYTES ;
680
- use crate :: storage:: LOCAL_SYNC_INTERVAL ;
681
661
use human_size:: { multiples, SpecificSize } ;
682
662
683
663
pub fn file_path ( s : & str ) -> Result < PathBuf , String > {
@@ -755,14 +735,4 @@ pub mod validation {
755
735
}
756
736
Ok ( size)
757
737
}
758
-
759
- pub fn upload_interval ( s : & str ) -> Result < u64 , String > {
760
- let u = s
761
- . parse :: < u64 > ( )
762
- . map_err ( |_| "invalid upload interval" . to_string ( ) ) ?;
763
- if u < LOCAL_SYNC_INTERVAL {
764
- return Err ( "object storage upload interval must be 60 seconds or more" . to_string ( ) ) ;
765
- }
766
- Ok ( u)
767
- }
768
738
}
0 commit comments