Skip to content

Commit

Permalink
Improve debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mbryzek committed Jun 11, 2024
1 parent aba1252 commit 0d12d92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/app/controllers/Code.scala
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ class Code @Inject() (
val newAttributes = updatedAttributes.filterNot { a =>
data.invocationForm.attributes.map(_.name).contains(a.name)
}.mkString(", ")
println(s"Code.orgAttributes org[${data.version.organization.key}] newAttributes: $newAttributes")
//println(s"Code.orgAttributes org[${data.version.organization.key}] newAttributes: $newAttributes")
} else {
println(s"Code.orgAttributes org[${data.version.organization.key}] newAttributes: NONE")
//println(s"Code.orgAttributes org[${data.version.organization.key}] newAttributes: NONE")
}

recordInvocation(gws.generator.key)
Expand Down
1 change: 0 additions & 1 deletion api/app/lib/Emails.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class Emails @Inject() (
): Unit = {
eachSubscription(context, org, publication, { subscription =>
val result = filter(subscription)
println(s"[${DateTime.now} DEBUG_FILTER] result: $result")
email.sendHtml(
to = Person(subscription.user),
subject = subject,
Expand Down
2 changes: 2 additions & 0 deletions api/app/processor/PurgeDeletedProcessor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ class PurgeDeletedProcessor @Inject()(
rows.foreach { row =>
if (row.deletedAt.isAfter(DateTime.now.minusDays(35))) {
// Temporarily work around triggers
debug(s"Moving deleted at back for table[${childTable.name}] pkey[${row.pkey}]")
moveDeletedAtBack(childTable, row.pkey)
}

debug(s"Hard deleting from ${childTable.name}where ${childTable.pkey.name} = '${row.pkey}'")
exec(
addPkey(childTable, row.pkey, Query(s"delete from ${childTable.name}"))
)
Expand Down

0 comments on commit 0d12d92

Please sign in to comment.