[+] update cpanel
1. fix logging; 2. refactor into a class;
This commit is contained in:
parent
43c711cb2c
commit
3d023047b4
10
d1/cpanel.py
10
d1/cpanel.py
@ -11,6 +11,13 @@ import logging
|
|||||||
import json
|
import json
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class Launcher:
|
||||||
|
def run(self):
|
||||||
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
with io.open(
|
with io.open(
|
||||||
'tmp/d1/cpanel.json', 'r'
|
'tmp/d1/cpanel.json', 'r'
|
||||||
) as f:
|
) as f:
|
||||||
@ -129,3 +136,6 @@ while True:
|
|||||||
|
|
||||||
for o in t1:
|
for o in t1:
|
||||||
stop_task(o)
|
stop_task(o)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
Launcher().run()
|
||||||
|
Loading…
Reference in New Issue
Block a user