-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest.py
28 lines (23 loc) · 807 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# encoding=utf-8
from pyscs.scs import SCS
from pyscs.atom import AtomSignal
import time
import random
import sys
sys.dont_write_bytecode = True
scs = SCS()
print(sys.argv, flush=True)
while True:
print("can stop------", flush=True)
# atom = AtomSignal(timeout=10, notice=True, restart=True, parameter="aaaaa")
msg, code = scs.can_not_stop()
print(" can not stop------", flush=True)
time.sleep(random.randint(20, 30))
print(" can not stop------", flush=True)
msg, code =scs.can_stop()
print("can stop-----", flush=True)
time.sleep(random.randint(1, 3))
print(" can not stop------", flush=True)
atom = AtomSignal(timeout=5, notice=True, restart=True, parameter="aaaaa")
msg, code = scs.can_not_stop(atom=atom)
time.sleep(random.randint(120, 200))