-
Notifications
You must be signed in to change notification settings - Fork 238
added script #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added script #82
Conversation
dorpvom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script is not well thought out. Some parts are not needed, others are missing. The tests fail and not all use cases are working.
| signal.signal(signal.SIGTERM, shutdown) | ||
|
|
||
|
|
||
| def main(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command_line_options have to be given as parameter (and propagated to program_setup).
| analysis_service = AnalysisScheduler(config=config) | ||
| analysis_service.shutdown() | ||
| logging.info('Restart Analysis component') | ||
| analysis_service = AnalysisScheduler(config=config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Start the Scheduler twice?
Also: The CompareScheduler has to also be started, as it also does view sync.
| @@ -0,0 +1,43 @@ | |||
| import logging | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script missing shebang and execution permissions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still missing ...
| try: | ||
| pass | ||
| except KeyboardInterrupt: | ||
| break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to kill this manually. Instead just wait some seconds and then start the teardown
|
|
||
|
|
||
| @pytest.mark.parametrize('script', [init_database, migrate_database, update_statistic, update_variety_data]) | ||
| @pytest.mark.parametrize('script', [init_database, migrate_database, update_statistic, update_variety_data, restart_analysis_and_reload_templates]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test fails. See above for reasons.
| PROGRAM_DESCRIPTION = 'Restart FACT Analysis Component and reload Analysis Templates' | ||
|
|
||
|
|
||
| def shutdown(signum, frame): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed if script self destroys (also applies for lines 20 + 21)
dorpvom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One request still open. Please change and issue a new jenkins build.
| @@ -0,0 +1,43 @@ | |||
| import logging | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still missing ...
…nalysis_and_reload_templates
Codecov Report
@@ Coverage Diff @@
## master #82 +/- ##
=========================================
Coverage ? 94.12%
=========================================
Files ? 291
Lines ? 14102
Branches ? 0
=========================================
Hits ? 13273
Misses ? 829
Partials ? 0
Continue to review full report at Codecov.
|
|
Before merging into master, master has to be merged into this branch and the script has to be moved to a suitable location ( != src ) |
…estart_analysis_and_reload_templates
…estart_analysis_and_reload_templates
No description provided.