tiny tidyings

This commit is contained in:
Philip Sargent
2021-04-05 14:01:15 +01:00
parent 53fef14024
commit 409037bdf3
9 changed files with 105 additions and 12 deletions

View File

@@ -25,10 +25,15 @@ import troggle.core.models_survex
"""This file declares TroggleModel which inherits from django.db.models.Model
All TroggleModel subclasses inherit persistence in the django relational database. This is known as
the django Object Relkational Mapping (ORM).
the django Object Relational Mapping (ORM).
There are more subclasses define in models_caves.py models_survex.py etc.
"""
# This variable is a dictionary holding gloablly visible indexes and cache functions.
# It is a Global Object, see https://python-patterns.guide/python/module-globals/
# troggle.models.TROG
TROG = {}
def get_process_memory():
usage=resource.getrusage(resource.RUSAGE_SELF)
return usage[2]/1024.0