get error when run in foreground mode without channel

This commit is contained in:
jb-alvarado 2024-07-11 15:35:44 +02:00
parent 89ca0cd744
commit e39186629a
2 changed files with 7 additions and 1 deletions

View File

@ -238,6 +238,12 @@ async fn main() -> std::io::Result<()> {
let manager = ChannelManager::new(Some(pool.clone()), channel.clone(), config.clone());
if ARGS.foreground {
if ARGS.channels.is_none() {
error!(
"Foreground mode needs at least 1 channel, run with `--channels (1 2 ...)`"
);
exit(1);
}
let m_queue = Arc::new(Mutex::new(MailQueue::new(*channel_id, config.mail)));
channel_controllers

@ -1 +1 @@
Subproject commit c0d6f02d739f8554cf3a6c4ee090f8b346b26e31
Subproject commit aa32865049996017c0c42df7e2c62c5210e153ab