misc: include current tenant name in cron process title (#70908)
This commit is contained in:
parent
5d8f4e8d6b
commit
d14312f3f8
|
@ -30,6 +30,7 @@ Depends: graphviz,
|
|||
python3-pyproj,
|
||||
python3-quixote,
|
||||
python3-requests,
|
||||
python3-setproctitle,
|
||||
python3-unidecode,
|
||||
python3-uwsgidecorators,
|
||||
python3-vobject,
|
||||
|
|
1
setup.py
1
setup.py
|
@ -195,6 +195,7 @@ setup(
|
|||
'python-magic',
|
||||
'workalendar',
|
||||
'requests',
|
||||
'setproctitle',
|
||||
],
|
||||
package_dir={'wcs': 'wcs'},
|
||||
packages=find_packages(),
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import datetime
|
||||
import sys
|
||||
|
||||
import setproctitle
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.utils.timezone import now
|
||||
|
@ -98,6 +100,7 @@ class Command(BaseCommand):
|
|||
if verbosity > 1:
|
||||
print(hostname, 'skip running, already handled')
|
||||
continue
|
||||
setproctitle.setproctitle(sys.argv[0] + ' cron [%s]' % hostname)
|
||||
if verbosity > 1:
|
||||
print('cron work on %s' % hostname)
|
||||
CronJob.log('start')
|
||||
|
|
Loading…
Reference in New Issue