Skip to content
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

Improvements for fetching results from redis. #282

Merged
merged 7 commits into from
Jul 9, 2020

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented Jul 6, 2020

No description provided.

Otherwise, waits 1 second.
This speeds up the fetch of results if it is supposed to be more results
and don't stress redis unnecessary.
This reduce the amount of queries to redis.
@jjnicola jjnicola marked this pull request as draft July 6, 2020 15:10
ospd_openvas/db.py Outdated Show resolved Hide resolved
@jjnicola jjnicola marked this pull request as ready for review July 7, 2020 07:06
@codecov
Copy link

codecov bot commented Jul 7, 2020

Codecov Report

Merging #282 into master will decrease coverage by 0.80%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #282      +/-   ##
==========================================
- Coverage   82.80%   81.99%   -0.81%     
==========================================
  Files           9        9              
  Lines        1477     1505      +28     
==========================================
+ Hits         1223     1234      +11     
- Misses        254      271      +17     
Impacted Files Coverage Δ
ospd_openvas/db.py 96.16% <25.00%> (-3.44%) ⬇️
ospd_openvas/preferencehandler.py 87.10% <33.33%> (-0.57%) ⬇️
ospd_openvas/daemon.py 62.40% <42.85%> (-0.51%) ⬇️
ospd_openvas/nvticache.py 98.52% <100.00%> (+0.05%) ⬆️

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 0ac1523...66de2fc. Read the comment docs.

@jjnicola jjnicola requested a review from bjoernricks July 8, 2020 15:02
got_results = False
if not got_results:
time.sleep(1)
time.sleep(0.05)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't be this in an else branch?

Suggested change
time.sleep(0.05)
else:
time.sleep(0.05)

ospd_openvas/daemon.py Show resolved Hide resolved
@jjnicola jjnicola requested a review from bjoernricks July 9, 2020 08:44
@bjoernricks bjoernricks merged commit cead447 into greenbone:master Jul 9, 2020
@jjnicola jjnicola deleted the redis branch July 9, 2020 10:44
ArnoStiefvater pushed a commit to ArnoStiefvater/ospd-openvas that referenced this pull request Oct 25, 2021
Extend results with optional URI parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants