Unverified Commit d7d756e6 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix timestamp filter


Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent dbd9f18e
Pipeline #17907 passed with stages
in 4 minutes and 46 seconds
......@@ -53,15 +53,8 @@ object App
None
}
}
.filter(record => {
logger.info("Filtering")
filters.forall(f => f(record))
}
)
.foldLeft(HashSet[DeleteMessage]())((agg, record) => {
logger.info("Aggregating")
agg + DeleteMessage(record, sessionId)
})
.filter(record => filters.forall(f => f(record)))
.foldLeft(HashSet[DeleteMessage]())((agg, record) => agg + DeleteMessage(record, sessionId))
)
.foreach(id => sendDelete(id))
} catch {
......
......@@ -67,8 +67,8 @@ trait MsgFilter {
recordId => report => report.recordId == recordId
private val buildCreatedAfterFilter: String => FilterFun =
timestamp => report => dateFormatter.parse(timestamp).after(report.timestamp)
timestamp => report => dateFormatter.parse(timestamp).before(report.timestamp)
private val buildCreatedBeforeFilter: String => FilterFun =
timestamp => report => dateFormatter.parse(timestamp).before(report.timestamp)
timestamp => report => dateFormatter.parse(timestamp).after(report.timestamp)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment