12345678910111213141516171819202122 |
- # -*- coding: utf-8 -*-
- # !/usr/bin/env python
- import signal
- from django.core.cache import caches
- serviceCache = caches['service']
- reportCache = caches['report']
- lockCache = caches['lock']
- def handle_usr1(sig, frame):
- from apps.web.core.models import SystemSettings
- SystemSettings.reload_settings()
- def init_signals():
- if hasattr(signal, "SIGUSR1"):
- signal.signal(signal.SIGUSR1, handle_usr1)
- init_signals()
|