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

Replace homecooked cache #82

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

itkovian
Copy link
Member

No description provided.

@itkovian itkovian force-pushed the replace-homecooked-cache branch 4 times, most recently from baee2ad to e73e5d9 Compare February 28, 2023 11:23
author Andy Georges <andy.georges@ugent.be> 1674744933 +0100
committer Andy Georges <andy.georges@ugent.be> 1677589584 +0100
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCAAdFiEEsRL1Gh5rbMUbS7S8e6TNo671utAFAmP9/FAACgkQe6TNo671
 utCySA//ZFeuoh5ZG3son8CXs0jZvfQBnxlnP0M3e4HbGi/KBINO95TB8TLjIbQ/
 ypvzEiHDeUIUsJn69ef645DGvNkop9H+1IepTh73WRNw/z13KBPjV/X7XoMUk4iZ
 7scmeHHbA6FH6KP4hgI5XCslGQKn6obucaCZgDE8e1bZldD8NuJxgQXapJvK0gQ/
 xJwarkZQ+4OTKxxRtCyWac33Ftx2z6mCbtdERae5KRuq+8oUOI1SG1q9kp+MGITa
 6L5GEED/7fsurfLEo0GRD9dHxlHd7RMO6GziCaIjcDeipFDP2bFM7x5uM0B9Nw2g
 dxO3gz7WG8YZF9vKtYuN1Sas1yGTLYBB5TjcI6lXhyCtQy2NVAeeAjbjCqr9dbzV
 n03oA9PdTojGq5dhXPwrkR17fXyoxiND7JI9ibdxL/yaGCZPJN0NgCHyZl5CnhOC
 o7qR3nhVZoJ9HalVzZnbjJcYjECWBYKYuRZoicclf56gvp6QvC/bDESQBBpe8SbF
 qIqc7SLQ+gddE8ajFRwiBeWU3UX9t/XPWpEvixvI4dXaZIpFydQGLsYQ3/9OehPv
 z0IzWp648H5hXfmYk3zpe25QfjGDj23OzwqHlNkr7KdReXck/2HhhDHL2Fw/h4jB
 CpYOlt05wLZlPnLt35sKomirx6yIOFU5rfkUdTU/0Ris90ZQWtI=
 =pjru
 -----END PGP SIGNATURE-----

test: fixes and refactoring to work with DiskCache
lib/vsc/utils/nagios.py Outdated Show resolved Hide resolved
lib/vsc/utils/nagios.py Outdated Show resolved Hide resolved
else:
self.new_shelf[key] = old
return False
stored = self.set(key=key, value=(now, data), expire=threshold)
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this do if threshold is None?

Copy link
Member Author

Choose a reason for hiding this comment

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

Then it will not set an expiration time on the key.

lib/vsc/utils/nagios.py Outdated Show resolved Hide resolved
lib/vsc/utils/nagios.py Outdated Show resolved Hide resolved
@@ -441,7 +448,7 @@ def __init__(self, **kwargs):
self._final = None
self._final_state = None

self._threshold = 0
self._threshold = None
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the implication of this?

@wdpypere
Copy link
Contributor

@itkovian did you actually try this somewhere? Is the disk cache thing just a drop in replacement? will current tools just keep working?

And changing the logger, does that still work? I did not remove it a while back because messages kept getting lost, because of mixing fancylogger and logging. (or I did not dare to remove it, also possible).

@itkovian
Copy link
Member Author

This is pretty much a drop-in replacement, but with nicer features and code we need not maintain. It is used in the nagios module tests.

@wdpypere
Copy link
Contributor

This is pretty much a drop-in replacement, but with nicer features and code we need not maintain. It is used in the nagios module tests.

I still disagree with this statement "code we need not maintain". If we have to vet the code and build rpms ourselves and have to follow up on version updates we are still paying a maintenance cost, so we are still maintaining this. 😄 maintenance is more than only "writing the code".

I'm not saying I won't merge this (well, I won't merge anything until I'm back), but change your definition of code maintenance . 😉

@itkovian
Copy link
Member Author

Well, code this is available on the innerwobbles and works may be better than rewriting things ourselves.

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