Added sched module for the loop
This commit is contained in:
parent
4fc9db3bd5
commit
87b4af1c06
1 changed files with 6 additions and 6 deletions
|
|
@ -131,7 +131,7 @@ def run(url, group=''):
|
|||
url, group=load_config()
|
||||
|
||||
|
||||
def start(sc):
|
||||
def run_start(sc):
|
||||
|
||||
# Get config from /etc/pastafari or ~/.config/pastafari
|
||||
|
||||
|
|
@ -151,7 +151,11 @@ def start(sc):
|
|||
sleep(60)
|
||||
"""
|
||||
|
||||
def start():
|
||||
|
||||
s=sched.scheduler(time.time, time.sleep)
|
||||
run_start(s)
|
||||
s.run()
|
||||
|
||||
if __name__=='__main__':
|
||||
|
||||
|
|
@ -161,10 +165,6 @@ if __name__=='__main__':
|
|||
|
||||
signal.signal(signal.SIGINT, catch_signal)
|
||||
|
||||
#start()
|
||||
s=sched.scheduler(time.time, time.sleep)
|
||||
start()
|
||||
|
||||
#s.enter(60, 1, start, (s,))
|
||||
start(s)
|
||||
s.run()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue