-
-
Save CamDavidsonPilon/0a2d1b1ee41372fb29aa6c70c1b1598a to your computer and use it in GitHub Desktop.
bg_dodge_fix.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pioreactor.background_jobs.base import BackgroundJobWithDodgingContrib | |
from pioreactor.config import config | |
def get_from_config(self, key: str, **get_kwargs): | |
v = config.get(f"{self.job_name}.config", key, **get_kwargs) | |
if v == "0": | |
return False | |
elif v == "1": | |
return True | |
else: | |
return v | |
BackgroundJobWithDodgingContrib.get_from_config=get_from_config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment