diff options
author | Antoine A <> | 2024-02-12 16:22:43 +0100 |
---|---|---|
committer | Antoine A <> | 2024-02-12 16:22:54 +0100 |
commit | a9d857111734198cf0f54a7bf9f4fdd39afd84c4 (patch) | |
tree | 64f47d407f3aaf0c755c43723765bf1cb94cde28 | |
parent | b8a29f97b6b4c571f53b81b2aa2acb8d46415a17 (diff) | |
download | libeufin-a9d857111734198cf0f54a7bf9f4fdd39afd84c4.tar.gz libeufin-a9d857111734198cf0f54a7bf9f4fdd39afd84c4.tar.bz2 libeufin-a9d857111734198cf0f54a7bf9f4fdd39afd84c4.zip |
Remove automatic EBICS fetch date range for now
-rw-r--r-- | nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt index 41ceb334..978c11de 100644 --- a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt +++ b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt @@ -363,22 +363,14 @@ private suspend fun fetchDocuments( ctx: FetchContext, docs: List<Document> ): Boolean { - /** - * Getting the least execution between the latest incoming - * and outgoing payments. This way, if ingesting outgoing - * (incoming) payments crashed, we make sure we request from - * the last successful outgoing (incoming) payment execution - * time, to obtain again from the bank those payments that did - * not make it to the database due to the crash. - */ - val lastIncomingTime = db.incomingPaymentLastExecTime() - val lastOutgoingTime = db.outgoingPaymentLastExecTime() - val requestFrom: Instant? = minTimestamp(lastIncomingTime, lastOutgoingTime) - - val lastExecutionTime: Instant? = ctx.pinnedStart ?: requestFrom + val lastExecutionTime: Instant? = ctx.pinnedStart; return docs.all { doc -> try { - logger.info("Fetching '${doc.fullDescription()}' from timestamp: $lastExecutionTime") + if (lastExecutionTime != null) { + logger.info("Fetching new '${doc.fullDescription()}'") + } else { + logger.info("Fetching '${doc.fullDescription()}' from timestamp: $lastExecutionTime") + } val doc = doc.doc() // downloading the content val content = downloadHelper(ctx, lastExecutionTime, doc) |