Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lars Kruse
aura-engine
Commits
7d81e7b6
Commit
7d81e7b6
authored
Aug 13, 2019
by
Gottfried Gaisbauer
Browse files
added switch for using testdata
parent
99498fb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
aura.py
View file @
7d81e7b6
...
...
@@ -47,19 +47,9 @@ class Aura(AuraLogger):
def
__init__
(
self
):
super
(
Aura
,
self
).
__init__
()
def
test_yourself
(
self
):
self
.
run_test
(
TestConfig
)
self
.
run_test
(
TestLogger
)
def
run_test
(
self
,
testingClass
):
runner
=
unittest
.
TextTestRunner
()
result
=
runner
.
run
(
unittest
.
makeSuite
(
testingClass
))
def
startup
(
self
):
server
=
object
# self.controller = AuraController(self.config)
# self.controller = AuraController(self.config)
# create scheduler and ls_communicator
self
.
liquidsoapcommunicator
=
LiquidSoapCommunicator
(
self
.
config
)
self
.
scheduler
=
AuraScheduler
(
self
.
config
)
...
...
@@ -73,16 +63,8 @@ class Aura(AuraLogger):
self
.
messenger
.
scheduler
=
self
.
scheduler
self
.
messenger
.
liquidsoapcommunicator
=
self
.
liquidsoapcommunicator
self
.
diskspace_watcher
=
DiskSpaceWatcher
(
self
.
config
,
self
.
logger
,
self
.
liquidsoapcommunicator
)
self
.
diskspace_watcher
.
start
()
def
receive_signal
(
signum
,
stack
):
print
(
"received signal"
)
server
.
reload
()
signal
.
signal
(
signal
.
SIGUSR1
,
receive_signal
)
#self.diskspace_watcher = DiskSpaceWatcher(self.config, self.logger, self.liquidsoapcommunicator)
#self.diskspace_watcher.start()
# and finally wait for redis message
self
.
join_comm
()
...
...
@@ -91,7 +73,6 @@ class Aura(AuraLogger):
self
.
start_web_service
()
def
join_comm
(
self
):
# start listener thread
self
.
messenger
.
start
()
...
...
@@ -112,10 +93,10 @@ class Aura(AuraLogger):
def
main
():
aura
=
Aura
()
if
len
(
sys
.
argv
)
>=
2
and
sys
.
argv
[
1
]
==
"--na-gspiast-di-?"
:
aura
.
test_yourself
(
)
else
:
aura
.
startup
()
if
len
(
sys
.
argv
)
>=
2
and
"--use-test-data"
in
sys
.
argv
:
aura
.
config
.
set
(
"use_test_data"
,
True
)
aura
.
startup
()
# # ## ## ## ## ## ## # #
...
...
modules/scheduling/calendar.py
View file @
7d81e7b6
...
...
@@ -312,7 +312,7 @@ class AuraCalendarService(threading.Thread):
# fetch data from importer
json_response
=
self
.
__fetch_data__
(
servicetype
)
if
not
json_response
:
if
not
json_response
and
self
.
config
.
get
(
"use_test_data"
)
:
use_testdata
=
True
# if a playlist is already fetched, do not fetch it again
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment