Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/workers/Cataloger.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class Cataloger(resmap: ResourceMap, content: StoredContent) {
var infoCache = Map[String, Seq[String]]()
// count of added topics
var addedTopics = 0
// newly created topics
var newTopics: List[Topic] = List()

def topics(scheme: Scheme, item: Item) = {
// where in the item's resource map is data for this scheme? Skip if unmapped
Expand Down Expand Up @@ -142,6 +144,7 @@ class Cataloger(resmap: ResourceMap, content: StoredContent) {
Topic.create(scheme.id, tag, title)
val topic = Topic.forSchemeAndTag(scheme.tag, tag).get
Indexer.index(topic)
newTopics = newTopics :+ topic
topic
}

Expand Down Expand Up @@ -306,6 +309,8 @@ object Cataloger {
// finally, are there any subscriptions to fulfill?
Conveyor.newItem(item)
//item.changeState("cataloged")
// let Conveyor know about any new topics also
cataloger.newTopics.foreach(t => Conveyor.newTopic(t))
}

def testExpression(expr: String, exprType: String, source: String) = {
Expand Down