mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
Use .get instead of lookup (#2165)
This commit is contained in:
@ -133,7 +133,7 @@ class Node(BASE_NODE, ORMMixin):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def mark_outdated_nodes(cls) -> None:
|
def mark_outdated_nodes(cls) -> None:
|
||||||
# if outdated agents are allowed, do not attempt to update
|
# if outdated agents are allowed, do not attempt to update
|
||||||
if os.environ["ONEFUZZ_ALLOW_OUTDATED_AGENT"] == "true":
|
if os.environ.get("ONEFUZZ_ALLOW_OUTDATED_AGENT") == "true":
|
||||||
return
|
return
|
||||||
|
|
||||||
# ony update 500 nodes at a time to mitigate timeout issues
|
# ony update 500 nodes at a time to mitigate timeout issues
|
||||||
@ -268,7 +268,10 @@ class Node(BASE_NODE, ORMMixin):
|
|||||||
from .pools import Pool
|
from .pools import Pool
|
||||||
from .scalesets import Scaleset
|
from .scalesets import Scaleset
|
||||||
|
|
||||||
if self.is_outdated() and os.environ["ONEFUZZ_ALLOW_OUTDATED_AGENT"] != "true":
|
if (
|
||||||
|
self.is_outdated()
|
||||||
|
and os.environ.get("ONEFUZZ_ALLOW_OUTDATED_AGENT") != "true"
|
||||||
|
):
|
||||||
logging.info(
|
logging.info(
|
||||||
"can_process_new_work agent and service versions differ, "
|
"can_process_new_work agent and service versions differ, "
|
||||||
"stopping node. "
|
"stopping node. "
|
||||||
|
Reference in New Issue
Block a user