change PyappApplication to PyApplication
This commit is contained in:
@@ -17,19 +17,19 @@ def run():
|
||||
|
||||
app_name = "default"
|
||||
if len(application_class) == 0:
|
||||
Log.error("No class annotated with @PyappApplication found.", True)
|
||||
Log.error("No class annotated with @PyApplication found.", True)
|
||||
if len(sys.argv) < 3 and "default" not in application_class:
|
||||
Log.error("No default @PyappApplication found. Please specify the 'name' parameter.", True)
|
||||
Log.error("No default @PyApplication found. Please specify the 'name' parameter.", True)
|
||||
if len(sys.argv) == 3:
|
||||
app_name = sys.argv[2]
|
||||
|
||||
app_cls = application_class.get(app_name)
|
||||
|
||||
if app_cls is None:
|
||||
Log.error(f"No class annotated with @PyappApplication found with the name '{app_name}'.", True)
|
||||
Log.error(f"No class annotated with @PyApplication found with the name '{app_name}'.", True)
|
||||
|
||||
if not hasattr(app_cls, "start"):
|
||||
Log.error("The class annotated with @PyappApplication should have a 'start' method.", True)
|
||||
Log.error("The class annotated with @PyApplication should have a 'start' method.", True)
|
||||
|
||||
Log.info(f"Application '{app_cls.__name__}' started.")
|
||||
timer = Timer(f"Application({app_name})")
|
||||
|
||||
Reference in New Issue
Block a user