Commit 394381e
committed
Update Attributed Time Processor to use new methods
* The attributed time processor needs to send data to two separate places: session_time for Update User and session time for Outcomes.
* Before sending data to outcomes, it needs to wait 30 seconds to see if the app re-opens in case the SDK will continue on the same session, this is for the outcomes endpoint to know session count for influences.
* It will now send session_time to the user manager immediately as this does not need to wait for 30 seconds. The ordering will be correct when the app is backgrounded. This time is sent to the user manager who enqueues a delta with the session time. Then the Operation Repo will start its background task and flush deltas.
* It will only send the elapsed time and does not need to handle unsent active time. This is because previous session times will be their own Delta instances that the operation repo / executor handles with retrying. These previous deltas already encompass the unsent active time.
* The Attributed Time Processor still has a separate background task that handles sending the outcome, manages the 30 seconds wait time, and maintains a background task for it. It uses unsent active time and resets to 0 when the request is successful.1 parent 58c8c79 commit 394381e
File tree
2 files changed
+5
-17
lines changed- iOS_SDK/OneSignalSDK
- OneSignalCore/Source
- Source
2 files changed
+5
-17
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | 195 | | |
197 | 196 | | |
198 | 197 | | |
| |||
Lines changed: 5 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | 112 | | |
123 | 113 | | |
124 | 114 | | |
| 115 | + | |
125 | 116 | | |
126 | 117 | | |
127 | 118 | | |
| |||
137 | 128 | | |
138 | 129 | | |
139 | 130 | | |
140 | | - | |
141 | | - | |
142 | 131 | | |
143 | 132 | | |
144 | 133 | | |
0 commit comments