Skip to content
This repository was archived by the owner on Nov 29, 2021. It is now read-only.

Start the server before initialize. - #209

Merged
jjnicola merged 7 commits into
greenbone:masterfrom
jjnicola:start-server
Feb 19, 2020
Merged

Start the server before initialize.#209
jjnicola merged 7 commits into
greenbone:masterfrom
jjnicola:start-server

Conversation

@jjnicola

Copy link
Copy Markdown
Member

This allows to create the socket and give a response to the client, while
the server is still in the initialization process.

@codecov

codecov Bot commented Feb 18, 2020

Copy link
Copy Markdown

Codecov Report

Merging #209 into master will decrease coverage by 0.34%.
The diff coverage is 10%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #209      +/-   ##
==========================================
- Coverage   73.52%   73.17%   -0.35%     
==========================================
  Files          18       18              
  Lines        2130     2140      +10     
==========================================
  Hits         1566     1566              
- Misses        564      574      +10
Impacted Files Coverage Δ
ospd/misc.py 51.56% <ø> (+4.98%) ⬆️
ospd/main.py 0% <0%> (ø) ⬆️
ospd/ospd.py 72.72% <27.27%> (-0.59%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa86a5e...46ccbae. Read the comment docs.

@bjoernricks bjoernricks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only pass the server once to the daemon instance. Therefore I am in favor of changing
daemon.run(server) to daemon.run() only. I've also thought about refactoring the complete initialization process of the daemon but passing the server to init should already provide all necessary use cases.

Comment thread ospd/ospd.py Outdated
This allows to create the socket and give a response to the client, while
the server is still in the initialization process.
Comment thread ospd/main.py Outdated
This new method it is the same as misc.remove_pidfile(), but it receives
the server too. It will close the server before exiting or during
KeyboardInterrupt exception.
Was replaced with exit_cleanup(), which closes the server socket too.
@jjnicola
jjnicola requested a review from bjoernricks February 19, 2020 14:44
@jjnicola
jjnicola merged commit 1da1f72 into greenbone:master Feb 19, 2020
@jjnicola
jjnicola deleted the start-server branch February 19, 2020 14:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants