moved core functions in tasks.py to class Tasker

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2020-06-10 18:19:58 +00:00
parent c08ad60100
commit 5d01d54852

View File

@ -6,6 +6,8 @@ __author__ = (
"Arthur Lu <learthurgo@gmail.com>",
)
class Tasker():
match_ = False
metric_ = False
pit_ = False
@ -16,17 +18,8 @@ pit_enable = True
config = {}
def init():
def __init__():
global match_
global metric_
global pit_
global match_enable
global metric_enable
global pit_enable
global config
config = su.load_config("config.json")
def match():
@ -105,6 +98,24 @@ def stop_metric():
def stop_pit():
pit_enable = False
def get_match():
return match_
def get_metric():
return metric_
def get_pit():
return pit_
def get_match_enable():
return match_enable
def get_metric_enable():
return metric_enable
def get_pit_enable():
return pit_enable
"""
def main():