@@ -43,6 +43,14 @@ public void run() {
43
43
},
44
44
UPDATE_SETTINGS_TIMER_INITIAL_DELAY ,
45
45
configurationManager .getConfiguration ().getUpdateSettingsWhenIdleInterval ());
46
+
47
+ configurationManager .onChanged (
48
+ ignored -> configurationManager .getSettingsManager ().updateSettingsThreadSafe ());
49
+ configurationManager
50
+ .getQueue ()
51
+ .onEventsPosted (
52
+ (ignored1 , ignored2 ) ->
53
+ configurationManager .getSettingsManager ().updateSettingsThreadSafe ());
46
54
}
47
55
48
56
public static ExceptionlessClient from (String apiKey , String serverUrl ) {
@@ -138,6 +146,7 @@ private Event.EventBuilder createEvent() {
138
146
.date (LocalDate .now ());
139
147
}
140
148
149
+ //todo this should be async
141
150
private void submitEvent (
142
151
EventPluginContext eventPluginContext , Consumer <EventPluginContext > handler ) {
143
152
eventPluginRunner .run (
@@ -163,8 +172,8 @@ public void submitSessionEnd(String sessionOrUserId) {
163
172
configurationManager .getSubmissionClient ().sendHeartBeat (sessionOrUserId , true );
164
173
}
165
174
166
- public void updateEmailAndDescription (
167
- String referenceId , String email , String description , Consumer < SubmissionResponse > handler ) {
175
+ public SubmissionResponse updateEmailAndDescription (
176
+ String referenceId , String email , String description ) {
168
177
SubmissionResponse response =
169
178
configurationManager
170
179
.getSubmissionClient ()
@@ -178,7 +187,8 @@ public void updateEmailAndDescription(
178
187
String .format (
179
188
"Failed to submit user email and description for event: %s" , referenceId ));
180
189
}
181
- handler .accept (response );
190
+
191
+ return response ;
182
192
}
183
193
184
194
public String getLastReferenceId () {
0 commit comments