File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
server/src/main/java/com/objectcomputing/checkins/services/pulse Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1111import lombok .Getter ;
1212import lombok .AllArgsConstructor ;
1313
14+ import jakarta .inject .Inject ;
1415import jakarta .inject .Named ;
1516import jakarta .inject .Singleton ;
1617
@@ -40,6 +41,9 @@ private class Frequency {
4041 private final SettingsServices settingsServices ;
4142 private final Map <String , Boolean > sent = new HashMap <String , Boolean >();
4243
44+ @ Inject
45+ private PulseEmail email ;
46+
4347 private final DayOfWeek emailDay = DayOfWeek .MONDAY ;
4448
4549 private String setting = "bi-weekly" ;
@@ -93,7 +97,7 @@ public void sendPendingEmail(LocalDate check) {
9397 LOG .info ("The Pulse Email has already been sent today" );
9498 } else {
9599 LOG .info ("Sending Pulse Email" );
96- send ();
100+ email . send ();
97101 sent .put (key , true );
98102 }
99103 break ;
@@ -110,10 +114,4 @@ public void sendPendingEmail(LocalDate check) {
110114 } while (start .isBefore (check ) || start .isEqual (check ));
111115 }
112116 }
113-
114- private void send () {
115- PulseEmail email = new PulseEmail (emailSender , checkInsConfiguration ,
116- memberProfileServices );
117- email .send ();
118- }
119117}
You can’t perform that action at this time.
0 commit comments