Some checks failed
Test before pr merge / test-lint (pull_request) Failing after 7s
Build on push / prepare (push) Successful in 10s
Build on push / core (push) Successful in 18s
Build on push / query (push) Successful in 17s
Build on push / dependency (push) Successful in 17s
Build on push / application (push) Successful in 16s
Build on push / mail (push) Successful in 15s
Build on push / database (push) Successful in 15s
Build on push / translation (push) Successful in 18s
Build on push / auth (push) Successful in 23s
Build on push / api (push) Successful in 16s
20 lines
527 B
Python
20 lines
527 B
Python
import asyncio
|
|
import time
|
|
|
|
from cpl.core.console import Console
|
|
from cpl.dependency.hosted.hosted_service import HostedService
|
|
|
|
|
|
class Hosted(HostedService):
|
|
def __init__(self):
|
|
self._stopped = False
|
|
|
|
async def start(self):
|
|
Console.write_line("Hosted Service Started")
|
|
while not self._stopped:
|
|
Console.write_line("Hosted Service Running")
|
|
await asyncio.sleep(5)
|
|
|
|
async def stop(self):
|
|
Console.write_line("Hosted Service Stopped")
|
|
self._stopped = True |