@@ -28,17 +28,17 @@ open class DefaultEventDispatcher : BackgroundingCallbacks, OPTEventDispatcher {
28
28
static let MAX_FAILURE_COUNT = 3
29
29
30
30
// default timerInterval
31
- var timerInterval : TimeInterval = 60 * 1 // every minute
31
+ var timerInterval : TimeInterval // every minute
32
32
// default batchSize.
33
33
// attempt to send events in batches with batchSize number of events combined
34
- var batchSize : Int = 10
34
+ var batchSize : Int
35
35
// start trimming the front of the queue when we get to over maxQueueSize
36
36
// TODO: implement
37
37
var maxQueueSize : Int = 30000
38
38
39
39
lazy var logger = OPTLoggerFactory . getLogger ( )
40
- var backingStore : DataStoreType = . file
41
- var backingStoreName : String = " OPTEventQueue "
40
+ var backingStore : DataStoreType
41
+ var backingStoreName : String
42
42
43
43
// for dispatching events
44
44
let dispatcher = DispatchQueue ( label: " DefaultEventDispatcherQueue " )
@@ -47,7 +47,7 @@ open class DefaultEventDispatcher : BackgroundingCallbacks, OPTEventDispatcher {
47
47
// timer as a atomic property.
48
48
var timer : AtomicProperty < Timer > = AtomicProperty < Timer > ( )
49
49
50
- public init ( batchSize: Int = 10 , backingStore: DataStoreType = . file, dataStoreName: String = " OPTEventQueue " , timerInterval: TimeInterval = 60 * 5 ) {
50
+ public init ( batchSize: Int = 10 , backingStore: DataStoreType = . file, dataStoreName: String = " OPTEventQueue " , timerInterval: TimeInterval = 60 * 1 ) {
51
51
self . batchSize = batchSize > 0 ? batchSize : 1
52
52
self . backingStore = backingStore
53
53
self . backingStoreName = dataStoreName
0 commit comments