Implemented live development server
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
from typing import Optional
|
||||
|
||||
from cpl.application.application_abc import ApplicationABC
|
||||
@@ -19,7 +20,7 @@ class Application(ApplicationABC):
|
||||
mail.add_header('Mime-Version: 1.0')
|
||||
mail.add_header('Content-Type: text/plain; charset=utf-8')
|
||||
mail.add_header('Content-Transfer-Encoding: quoted-printable')
|
||||
mail.add_receiver('sven.heidemann@sh-edraft.de')
|
||||
mail.add_receiver(' sven.heidemann@sh-edraft.de')
|
||||
mail.subject = f'Test - {self._configuration.environment.host_name}'
|
||||
mail.body = 'Dies ist ein Test :D'
|
||||
self._mailer.send_mail(mail)
|
||||
@@ -28,11 +29,15 @@ class Application(ApplicationABC):
|
||||
self._logger.debug(__name__, 'Started console_old test')
|
||||
Console.write_line('Hello World')
|
||||
Console.write('\nName: ')
|
||||
Console.write_line('Hello', Console.read_line())
|
||||
Console.write_line(' Hello', Console.read_line())
|
||||
Console.clear()
|
||||
Console.write_at(5, 5, 'at 5, 5')
|
||||
Console.write_at(10, 10, 'at 10, 10')
|
||||
|
||||
@staticmethod
|
||||
def _wait(time_ms: int):
|
||||
time.sleep(time_ms)
|
||||
|
||||
def configure(self):
|
||||
self._logger = self._services.get_service(LoggerABC)
|
||||
self._mailer = self._services.get_service(EMailClientABC)
|
||||
@@ -42,5 +47,6 @@ class Application(ApplicationABC):
|
||||
self._logger.debug(__name__, f'Host: {self._configuration.environment.host_name}')
|
||||
self._logger.debug(__name__, f'Environment: {self._configuration.environment.environment_name}')
|
||||
self._logger.debug(__name__, f'Customer: {self._configuration.environment.customer}')
|
||||
Console.spinner('Test', self._wait, 999999, spinner_foreground_color='red')
|
||||
# self.test_send_mail()
|
||||
# self.test_console()
|
||||
|
Reference in New Issue
Block a user