mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
fixing download jar
This commit is contained in:
parent
056856cf98
commit
2b484d5a07
@ -103,12 +103,12 @@ class ServersController(metaclass=Singleton):
|
||||
@staticmethod
|
||||
def set_download(server_id):
|
||||
srv: Server = ServersController().get_server_instance_by_id(server_id)
|
||||
return srv.stats_helper.set_download(server_id)
|
||||
return srv.stats_helper.set_download()
|
||||
|
||||
@staticmethod
|
||||
def finish_download(server_id):
|
||||
srv: Server = ServersController().get_server_instance_by_id(server_id)
|
||||
return srv.stats_helper.finish_download(server_id)
|
||||
return srv.stats_helper.finish_download()
|
||||
|
||||
@staticmethod
|
||||
def get_download_status(server_id):
|
||||
|
@ -34,25 +34,33 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class Controller:
|
||||
def __init__(self, database, helper):
|
||||
self.helper = helper
|
||||
self.server_jars = ServerJars(helper)
|
||||
self.users_helper = HelperUsers(database, self.helper)
|
||||
self.roles_helper = HelperRoles(database)
|
||||
self.servers_helper = HelperServers(database)
|
||||
self.management_helper = HelpersManagement(database, self.helper)
|
||||
self.authentication = Authentication(self.helper)
|
||||
self.crafty_perms = CraftyPermsController()
|
||||
self.management = ManagementController(self.management_helper)
|
||||
self.roles = RolesController(self.users_helper, self.roles_helper)
|
||||
self.server_perms = ServerPermsController()
|
||||
self.servers = ServersController(
|
||||
self.helper: Helpers = helper
|
||||
self.server_jars: ServerJars = ServerJars(helper)
|
||||
self.users_helper: HelperUsers = HelperUsers(database, self.helper)
|
||||
self.roles_helper: HelperRoles = HelperRoles(database)
|
||||
self.servers_helper: HelperServers = HelperServers(database)
|
||||
self.management_helper: HelpersManagement = HelpersManagement(
|
||||
database, self.helper
|
||||
)
|
||||
self.authentication: Authentication = Authentication(self.helper)
|
||||
self.crafty_perms: CraftyPermsController = CraftyPermsController()
|
||||
self.management: ManagementController = ManagementController(
|
||||
self.management_helper
|
||||
)
|
||||
self.roles: RolesController = RolesController(
|
||||
self.users_helper, self.roles_helper
|
||||
)
|
||||
self.server_perms: ServerPermsController = ServerPermsController()
|
||||
self.servers: ServersController = ServersController(
|
||||
self.helper, self.servers_helper, self.management_helper
|
||||
)
|
||||
self.users = UsersController(
|
||||
self.users: UsersController = UsersController(
|
||||
self.helper, self.users_helper, self.authentication
|
||||
)
|
||||
tz = get_localzone()
|
||||
self.support_scheduler = BackgroundScheduler(timezone=str(tz))
|
||||
self.support_scheduler: BackgroundScheduler = BackgroundScheduler(
|
||||
timezone=str(tz)
|
||||
)
|
||||
self.support_scheduler.start()
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
Reference in New Issue
Block a user