mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-09-20 06:17:29 +02:00
26 lines
468 B
Python
26 lines
468 B
Python
|
import asyncio
|
||
|
|
||
|
from core.api.step import Step
|
||
|
|
||
|
|
||
|
class CustomStep(Step):
|
||
|
|
||
|
async def run(self):
|
||
|
i = 0
|
||
|
while i < 3:
|
||
|
await asyncio.sleep(1)
|
||
|
print("RUN STEP")
|
||
|
i = i + 1
|
||
|
|
||
|
|
||
|
def setup(cbpi):
|
||
|
'''
|
||
|
This method is called by the server during startup
|
||
|
Here you need to register your plugins at the server
|
||
|
|
||
|
:param cbpi: the cbpi core
|
||
|
:return:
|
||
|
'''
|
||
|
|
||
|
cbpi.plugin.register("CustomStep", CustomStep)
|