Skip to content

Commit 2ec6154

Browse files
committed
A bit of debugging
1 parent 6b7b4c9 commit 2ec6154

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

nimletter.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "0.5.0"
3+
version = "0.5.1"
44
author = "ThomasTJdev"
55
description = "Newsletter"
66
license = "AGPL v3"

src/email/email_channel.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ proc getUserData(userID: string): seq[string] =
6363

6464
proc getMailData(flowStepID: string): string =
6565
pg.withConnection conn:
66-
return getValue(conn, sqlSelect(
66+
result = getValue(conn, sqlSelect(
6767
table = "flow_steps",
6868
select = [
6969
"flow_steps.step_number",
@@ -96,7 +96,7 @@ proc sendPendingEmail(pendingEmail: PendingMailObj) =
9696
]
9797
), pendingEmail.mailID)
9898

99-
99+
echo "Email being sent to " & userData[1]
100100
# Send the email
101101
let sendData = sendMailMimeNow(
102102
contactID = pendingEmail.userID,

src/scheduling/schedule_mail.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ proc createPendingEmail*(
7373
else:
7474
scheduledFor = "NULL"
7575

76+
echo "Scheduled for " & scheduledFor & " for user " & userID
77+
7678
var args = @[userID]
7779
var data = @["user_id"]
7880
if listID != "":
@@ -109,8 +111,7 @@ proc createPendingEmail*(
109111

110112
proc createPendingEmailFromFlowstep*(userID, listID, flowID: string, stepNumber: int) =
111113

112-
when defined(dev):
113-
echo "Creating pending email from flowID " & flowID & " and step " & $stepNumber
114+
echo "Creating pending email from flowID " & flowID & " and step " & $stepNumber & " for user " & userID
114115

115116
var flowStep: seq[string]
116117
pg.withConnection conn:

0 commit comments

Comments
 (0)