Skip to content

Commit 5773785

Browse files
committed
Modified the beaterror exception
1 parent 3b52e01 commit 5773785

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cronus/beat.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Implements the beat library
33
44
Date created: 19th May 2014
5+
6+
Modified by Vishal to skip the beatError and let beat.true loop
7+
complete the execution. If the execution time is more then set the
8+
duration_to_sleep as 0.
59
"""
610

711
import datetime
@@ -36,7 +40,8 @@ def sleep():
3640
td = datetime.datetime.now() - loop_start_time
3741
duration_to_sleep = loop_duration - td.total_seconds()
3842
if duration_to_sleep < 0:
39-
raise BeatError("skipping sleep. Too much work!")
43+
duration_to_sleep = 0; # Modified.
44+
#raise BeatError("skipping sleep. Too much work!") Commented
4045
time.sleep(duration_to_sleep)
4146

4247
def true():

0 commit comments

Comments
 (0)