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
@@ -1,4 +1,3 @@
|
||||
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||
import "pkg:/components/Web/PlayletWebServer/Middleware/BookmarksRouter.bs"
|
||||
import "pkg:/components/Web/PlayletWebServer/Middleware/CacheRouter.bs"
|
||||
import "pkg:/components/Web/PlayletWebServer/Middleware/DashRouter.bs"
|
||||
@@ -23,8 +22,21 @@ import "pkg:/components/Web/WebServer/Middleware/HttpStaticFilesRouter.bs"
|
||||
import "pkg:/components/Web/WebServer/WebSockets/WebSocketMiddleware.bs"
|
||||
|
||||
function Init()
|
||||
m.top.packageName = "Playlet"
|
||||
m.top.serverName = "Playlet Web Server"
|
||||
end function
|
||||
|
||||
function OnNodeReady()
|
||||
m.sceneNodes = {
|
||||
"appController": m.top.appController
|
||||
"preferences": m.top.preferences
|
||||
"innertube": m.top.innertube
|
||||
"invidious": m.top.invidious
|
||||
"profilesService": m.top.profilesService
|
||||
"applicationInfo": m.top.applicationInfo
|
||||
"videoQueue": m.top.videoQueue
|
||||
"bookmarksService": m.top.bookmarksService
|
||||
"loungeService": m.top.loungeService
|
||||
"jobQueue": m.top.jobQueue
|
||||
}
|
||||
end function
|
||||
|
||||
function GetServerAddress(_unused as dynamic) as dynamic
|
||||
@@ -37,6 +49,7 @@ function GetServerAddress(_unused as dynamic) as dynamic
|
||||
end function
|
||||
|
||||
function SetupRoutes(server as object)
|
||||
server.sceneNodes = m.sceneNodes
|
||||
#if DEBUG
|
||||
'CORS is mostly for developing the web app
|
||||
server.UseRouter(new Http.CorsMiddleware())
|
||||
@@ -60,7 +73,7 @@ function SetupRoutes(server as object)
|
||||
server.UseRouter(new Http.SearchHistoryRouter(server))
|
||||
server.UseRouter(new Http.PlayletLibUrlsRouter(server))
|
||||
server.UseRouter(new Http.DialRouter(server))
|
||||
server.UseRouter(new Http.CacheRouter())
|
||||
server.UseRouter(new Http.CacheRouter(server))
|
||||
server.UseRouter(new Http.RegistryRouter(server))
|
||||
server.UseRouter(new Http.PlayletInvidiousBackendRouter(server))
|
||||
server.UseRouter(new Http.InnertubeRouter(server))
|
||||
|
||||
Reference in new issue
Block a user