Skip to content

Commit ac3367a

Browse files
committed
Minor polish in preparation for review and merge of the basic janitor
functionality to ease support load.
1 parent 0e7fa7a commit ac3367a

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

mig/install/MiGserver-template.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ enable_notify = __ENABLE_NOTIFY__
646646
enable_imnotify = __ENABLE_IMNOTIFY__
647647
# Enable users to schedule tasks with a cron/at-like interface
648648
enable_crontab = __ENABLE_CRONTAB__
649-
# Enable janitor servide to handel recurring tasks like clean up and cache updates
649+
# Enable janitor service to handle recurring tasks like clean up and cache updates
650650
enable_janitor = __ENABLE_JANITOR__
651651
# Enable 2FA for web access and IO services with any TOTP authenticator client
652652
# IMPORTANT: Do NOT change this option manually here (requires Apache changes)!

mig/lib/daemon.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
#
2121
# You should have received a copy of the GNU General Public License
2222
# along with this program; if not, write to the Free Software
23-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24+
# USA.
2425
#
2526
# -- END_HEADER ---
2627
#
@@ -39,7 +40,9 @@ def stop_running():
3940

4041

4142
def check_stop():
42-
"""A simple test to see if stop marker was set after some signal was received"""
43+
"""A simple test to see if stop marker was set after some signal was
44+
received.
45+
"""
4346
return _stop_event.is_set()
4447

4548

mig/lib/janitor.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
#
2121
# You should have received a copy of the GNU General Public License
2222
# along with this program; if not, write to the Free Software
23-
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24+
# USA.
2425
#
2526
# -- END_HEADER ---
2627
#
@@ -375,7 +376,8 @@ def manage_trivial_user_requests(configuration, now=time.time()):
375376
continue
376377
req_id = filename
377378
req_path = os.path.join(configuration.user_pending, req_id)
378-
_logger.debug("checking if account request in %r is trivial" % req_path)
379+
_logger.debug("checking if account request in %r is trivial" %
380+
req_path)
379381
req_age = now - os.path.getmtime(req_path)
380382
req_age_minutes = req_age / SECS_PER_MINUTE
381383
if req_age_minutes > MANAGE_TRIVIAL_REQ_MINUTES:
@@ -385,7 +387,8 @@ def manage_trivial_user_requests(configuration, now=time.time()):
385387
)
386388
manage_single_req(configuration, req_id, req_path, db_path, now)
387389
handled += 1
388-
_logger.debug("handled %d trivial user account request action(s)" % handled)
390+
_logger.debug("handled %d trivial user account request action(s)" %
391+
handled)
389392
return handled
390393

391394

@@ -436,11 +439,11 @@ def remind_and_expire_user_pending(configuration, now=time.time()):
436439
admin_copy=admin_copy,
437440
auth_type=auth_type,
438441
):
439-
_logger.warning(
440-
"failed to expire %s request from %r" % (req_id, client_id)
441-
)
442+
_logger.warning("failed to expire %s request from %r" %
443+
(req_id, client_id))
442444
else:
443-
_logger.info("expired %s request from %r" % (req_id, client_id))
445+
_logger.info("expired %s request from %r" % (req_id,
446+
client_id))
444447
handled += 1
445448
_logger.debug("handled %d user account request action(s)" % handled)
446449
return handled

tests/fixture/confs-stdlocal/MiGserver.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ enable_notify = False
646646
enable_imnotify = False
647647
# Enable users to schedule tasks with a cron/at-like interface
648648
enable_crontab = True
649-
# Enable janitor servide to handel recurring tasks like clean up and cache updates
649+
# Enable janitor service to handle recurring tasks like clean up and cache updates
650650
enable_janitor = False
651651
# Enable 2FA for web access and IO services with any TOTP authenticator client
652652
# IMPORTANT: Do NOT change this option manually here (requires Apache changes)!

0 commit comments

Comments
 (0)