@@ -157,28 +157,28 @@ func initConstants() *constants {
157
157
}
158
158
159
159
// initCampaignManager initializes the campaign manager.
160
- func initCampaignManager (app * App ) * manager.Manager {
160
+ func initCampaignManager (q * Queries , cs * constants , app * App ) * manager.Manager {
161
161
campNotifCB := func (subject string , data interface {}) error {
162
- return app .sendNotification (app . constants .NotifyEmails , subject , notifTplCampaign , data )
162
+ return app .sendNotification (cs .NotifyEmails , subject , notifTplCampaign , data )
163
163
}
164
164
return manager .New (manager.Config {
165
165
Concurrency : ko .Int ("app.concurrency" ),
166
166
MaxSendErrors : ko .Int ("app.max_send_errors" ),
167
- FromEmail : app . constants .FromEmail ,
168
- UnsubURL : app . constants .UnsubURL ,
169
- OptinURL : app . constants .OptinURL ,
170
- LinkTrackURL : app . constants .LinkTrackURL ,
171
- ViewTrackURL : app . constants .ViewTrackURL ,
172
- }, newManagerDB (app . queries ), campNotifCB , lo )
167
+ FromEmail : cs .FromEmail ,
168
+ UnsubURL : cs .UnsubURL ,
169
+ OptinURL : cs .OptinURL ,
170
+ LinkTrackURL : cs .LinkTrackURL ,
171
+ ViewTrackURL : cs .ViewTrackURL ,
172
+ }, newManagerDB (q ), campNotifCB , lo )
173
173
174
174
}
175
175
176
176
// initImporter initializes the bulk subscriber importer.
177
- func initImporter (app * App ) * subimporter.Importer {
178
- return subimporter .New (app . queries .UpsertSubscriber .Stmt ,
179
- app . queries .UpsertBlacklistSubscriber .Stmt ,
180
- app . queries .UpdateListsDate .Stmt ,
181
- app . db .DB ,
177
+ func initImporter (q * Queries , db * sqlx. DB , app * App ) * subimporter.Importer {
178
+ return subimporter .New (q .UpsertSubscriber .Stmt ,
179
+ q .UpsertBlacklistSubscriber .Stmt ,
180
+ q .UpdateListsDate .Stmt ,
181
+ db .DB ,
182
182
func (subject string , data interface {}) error {
183
183
app .sendNotification (app .constants .NotifyEmails , subject , notifTplImport , data )
184
184
return nil
0 commit comments