From 0d12d928f029e6526e095af55c18f62275170939 Mon Sep 17 00:00:00 2001 From: Michael Bryzek Date: Mon, 10 Jun 2024 21:16:19 -0400 Subject: [PATCH] Improve debug messages --- api/app/controllers/Code.scala | 4 ++-- api/app/lib/Emails.scala | 1 - api/app/processor/PurgeDeletedProcessor.scala | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/app/controllers/Code.scala b/api/app/controllers/Code.scala index 3443704de..89feb4324 100644 --- a/api/app/controllers/Code.scala +++ b/api/app/controllers/Code.scala @@ -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) diff --git a/api/app/lib/Emails.scala b/api/app/lib/Emails.scala index 39bb3d9b1..b5532c22d 100644 --- a/api/app/lib/Emails.scala +++ b/api/app/lib/Emails.scala @@ -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, diff --git a/api/app/processor/PurgeDeletedProcessor.scala b/api/app/processor/PurgeDeletedProcessor.scala index 9aef1fd4d..821a62352 100644 --- a/api/app/processor/PurgeDeletedProcessor.scala +++ b/api/app/processor/PurgeDeletedProcessor.scala @@ -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}")) )