Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aura-engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Kruse
aura-engine
Commits
40f1e42b
Commit
40f1e42b
authored
7 years ago
by
Gottfried Gaisbauer
Browse files
Options
Downloads
Patches
Plain Diff
removed endless recursion when database is empty and connection to pv cannot be established
parent
4d2e8aa0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aura.py
+0
-3
0 additions, 3 deletions
aura.py
modules/scheduling/scheduler.py
+11
-0
11 additions, 0 deletions
modules/scheduling/scheduler.py
with
11 additions
and
3 deletions
aura.py
+
0
−
3
View file @
40f1e42b
...
...
@@ -43,9 +43,6 @@ class Aura(AuraCommon):
signal
.
signal
(
signal
.
SIGUSR1
,
receive_signal
)
# addition initialization
self
.
scheduler
.
fetch_new_programme
()
def
join_comm
(
self
):
# start listener thread
self
.
messenger
.
start
()
...
...
This diff is collapsed.
Click to expand it.
modules/scheduling/scheduler.py
+
11
−
0
View file @
40f1e42b
...
...
@@ -76,6 +76,7 @@ class AuraScheduler(ExceptionLogger, threading.Thread):
active_entry
=
None
logger
=
None
config
=
None
tried_fetching
=
0
def
__init__
(
self
,
config
):
"""
...
...
@@ -333,6 +334,13 @@ class AuraScheduler(ExceptionLogger, threading.Thread):
# ------------------------------------------------------------------------------------------ #
def
fetch_new_programme
(
self
):
if
self
.
tried_fetching
==
5
:
self
.
logger
.
error
(
"
Cannot connect to PV! No Programme loaded!
"
)
self
.
tried_fetching
=
0
return
""
self
.
tried_fetching
+=
1
acs
=
AuraCalendarService
(
self
.
config
)
queue
=
acs
.
get_queue
()
...
...
@@ -344,6 +352,9 @@ class AuraScheduler(ExceptionLogger, threading.Thread):
if
response
==
"
fetching_finished
"
:
self
.
load_programme_from_db
()
if
self
.
programme
is
not
None
and
len
(
self
.
programme
)
>
0
:
self
.
tried_fetching
=
0
return
self
.
get_act_programme_as_string
()
else
:
self
.
logger
.
warning
(
"
Got an unknown response from AuraCalendarService:
"
+
response
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment