mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-27 13:14:24 -04:00
merge queues and actors apps into new workers app
This commit is contained in:
parent
e50f8cb3b6
commit
e469c5a344
37 changed files with 89 additions and 304 deletions
|
@ -41,7 +41,7 @@ def register_urls(api: NinjaAPI) -> NinjaAPI:
|
|||
api.add_router('/core/', 'api.v1_core.router')
|
||||
api.add_router('/crawls/', 'api.v1_crawls.router')
|
||||
api.add_router('/cli/', 'api.v1_cli.router')
|
||||
api.add_router('/jobs/', 'api.v1_actors.router')
|
||||
api.add_router('/workers/', 'api.v1_workers.router')
|
||||
return api
|
||||
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class TaskSchema(Schema):
|
|||
|
||||
|
||||
class ActorSchema(Schema):
|
||||
# TYPE: str = 'actors.actor.ActorType'
|
||||
# TYPE: str = 'workers.actor.ActorType'
|
||||
|
||||
# name: str
|
||||
#pid: int | None
|
||||
|
@ -97,7 +97,7 @@ class ActorSchema(Schema):
|
|||
|
||||
|
||||
class OrchestratorSchema(Schema):
|
||||
# TYPE: str = 'actors.orchestrator.Orchestrator'
|
||||
# TYPE: str = 'workers.orchestrator.Orchestrator'
|
||||
|
||||
#pid: int | None
|
||||
exit_on_idle: bool
|
||||
|
@ -114,7 +114,7 @@ class OrchestratorSchema(Schema):
|
|||
def get_orchestrators(request):
|
||||
"""List all the task orchestrators (aka Orchestrators) that are currently running"""
|
||||
|
||||
from actors.orchestrator import Orchestrator
|
||||
from workers.orchestrator import Orchestrator
|
||||
orchestrator = Orchestrator()
|
||||
|
||||
return [orchestrator]
|
||||
|
@ -124,6 +124,6 @@ def get_orchestrators(request):
|
|||
def get_actors(request):
|
||||
"""List all the task consumer workers (aka Actors) that are currently running"""
|
||||
|
||||
from actors.orchestrator import Orchestrator
|
||||
from workers.orchestrator import Orchestrator
|
||||
orchestrator = Orchestrator()
|
||||
return orchestrator.actor_types.values()
|
Loading…
Add table
Add a link
Reference in a new issue