Add Job System (#656)
* Add Job System * Remove testing stuff * changelog * plugin work * Convert a couple more jobs * simplify callback * assert * Logging changes and rendezvous perf * changelog * sb segment viewed job * clear cache, and few changes * Lint fix * a couple more jobs * reduce rendezvous in web server * refactor * Lint fix * no message * test shutdown * comment * free fields --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
45983a67af
commit
d70a07049a
74 files changed
+1090
-298
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import "pkg:/components/VideoFeed/FeedLoadState.bs"
|
||||
import "pkg:/source/utils/StringUtils.bs"
|
||||
|
||||
@job("VideoRowListContentJob")
|
||||
function ExecuteJob() as void
|
||||
input = JobGetInput()
|
||||
|
||||
feeds = input.feeds
|
||||
rowList = input.node
|
||||
|
||||
contentNode = CreateObject("roSGNode", "ContentNode")
|
||||
|
||||
for each feed in feeds
|
||||
feedContentNode = CreateObject("roSGNode", "FeedContentNode")
|
||||
feedContentNode.title = feed.title
|
||||
feedContentNode.feedSourcesIndex = 0
|
||||
feedContentNode.loadState = FeedLoadState.None
|
||||
feedSources = feed.feedSources
|
||||
for i = 0 to feedSources.count() - 1
|
||||
feedSources[i].state = {
|
||||
loadState: FeedLoadState.None
|
||||
}
|
||||
end for
|
||||
feedContentNode.feedSources = feedSources
|
||||
|
||||
for i = 1 to 4
|
||||
feedContentNode.createChild("LoadingContentNode")
|
||||
end for
|
||||
|
||||
contentNode.appendChild(feedContentNode)
|
||||
end for
|
||||
|
||||
rowList.content = contentNode
|
||||
end function
|
||||
Reference in new issue
Block a user