def init_restrictions(filename): # Set up tables that list the rules and resource restrictions init_restriction_tables(filename) # This flushes and initializes the tables that track resource consumption nanny.initialize_consumed_resource_tables() # Start the nanny to check resource use... nanny.start_resource_nanny()
def initialize_restrictions(restrictionsfn): """ <Purpose> Sets up restrictions. This allows some resources to be metered despite the use of repyportability / repyhelper. CPU / memory / disk space will not be metered. Call restrictions will also be enabled. <Arguments> restrictionsfn: The file name of the restrictions file. <Exceptions> None. <Side Effects> Enables restrictions. <Returns> None """ restrictions.init_restriction_tables(restrictionsfn) nanny.initialize_consumed_resource_tables() enable_restrictions()