Skip to content

Commit d6b2a37

Browse files
jsf9kdav3r
andauthored
Avoid hard-coding collection name
Co-authored-by: dav3r <daver@geekpad.com>
1 parent fc56227 commit d6b2a37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cyhy_commander/wd40.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def main():
105105
stuck_cutoff,
106106
)
107107
filter = {"status": STATUS.RUNNING, "last_change": {"$lt": stuck_cutoff}}
108-
hosts_cursor = db.hosts.find(filter, {"owner": True})
108+
hosts_cursor = db.HostDoc.collection.find(filter, {"owner": True})
109109

110110
# Gather a set of all owners associated with these host docs
111111
logging.info("Gathering all the owners associated with these host docs.")
@@ -125,7 +125,7 @@ def main():
125125
"Updating the host docs with stuck scans by setting their status to %s.",
126126
STATUS.WAITING,
127127
)
128-
result = db.hosts.update_many(
128+
result = db.HostDoc.collection.update_many(
129129
filter,
130130
{"$set": {"status": STATUS.WAITING}},
131131
)

0 commit comments

Comments
 (0)