Skip to content

Commit dab2486

Browse files
committed
ignore internal state files in grid_notify clean up
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6101 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent b867424 commit dab2486

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mig/server/grid_notify.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# --- BEGIN_HEADER ---
55
#
66
# grid_notify - Notify users about relevant system events
7-
# Copyright (C) 2010-2023 The MiG Project lead by Brian Vinter
7+
# Copyright (C) 2010-2024 The MiG Project lead by Brian Vinter
88
#
99
# This file is part of MiG.
1010
#
@@ -41,6 +41,7 @@
4141

4242
from mig.shared.base import extract_field, expand_openid_alias
4343
from mig.shared.conf import get_configuration_object
44+
from mig.shared.defaults import ignore_file_names
4445
from mig.shared.fileio import unpickle, delete_file
4546
from mig.shared.logger import daemon_logger, \
4647
register_hangup_handler
@@ -87,6 +88,9 @@ def cleanup_notify_home(configuration, notified_users=[], timestamp=None):
8788
now_timestamp = time.time()
8889
cleanuptime = now_timestamp - timestamp
8990
for direntry in os.listdir(notify_home):
91+
# NOTE: do NOT delete placeholder and scm state files
92+
if direntry in ignore_file_names:
93+
continue
9094
filepath = os.path.join(notify_home, direntry)
9195
ctime = os.path.getctime(filepath)
9296
if ctime > cleanuptime:

0 commit comments

Comments
 (0)