<commit_before>#!/usr/bin/env python
#
# Project:
#   glideinWMS
#
# File Version:
#
# Description:
#   This is the glideinFactoryEntryGroup. Common Tasks like querying collector
#   and advertizing the work done by group are done here
#
# Arguments:
#   $1 = poll period (in seconds)
#   $2 = advertize rate (every $2 loops)
#   $3 = glidein submit_dir
#   $4 = entry name
#
# Author:
#   <NAME> (October 2012)
#

import signal
import os
import os.path
import sys
import fcntl
import traceback
import time
import string
import math
import copy
import random
import cPickle
import select
import logging

STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"../../"))

from glideinwms.lib import logSupport
from glideinwms.lib import cleanupSupport
from glideinwms.lib import glideinWMSVersion
from glideinwms.factory import glideFactoryEntry
from glideinwms.factory import glideFactoryConfig as gfc
from glideinwms.factory import glideFactoryLib as gfl
from glideinwms.factory import glideFactoryInterface as gfi
from glideinwms.factory import glideFactoryPidLib
from glideinwms.factory import glideFactoryMonitoring
from glideinwms.factory import glideFactoryDowntimeLib

############################################################
# Memory foot print of a entry process when forked for check_and_perform_work
# Set a conservative limit of 120 MB (based on USCD 2.6 factory Pss of 115 MB)
#   plus a safety factor of 2

ENTRY_MEM_REQ_BYTES = 120000000 * 2
############################################################

class EntryGroup:

    def __init__(self):
        pass

############################################################
def check_parent(parent_pid, glideinDescript, my_entries):
    """
    Check to make sure that we aren't an orphaned process.  If Factory
    daemon has died, then clean up after ourselves and kill ourselves off.

    @type parent_pid: int
    @param parent_pid: pid for the Factory daemon process

    @type glideinDescript: glideFactoryConfig.GlideinDescript
    @param glideinDescript: Object that encapsulates glidein.descript in the Factory root directory

    @type my_entries: dict
    @param my_entries: Dictionary of entry objects keyed on entry name
<commit_msg>Increased the total estimated mem footprint of the entry process to 1GB<commit_after>#!/usr/bin/env python
#
# Project:
#   glideinWMS
#
# File Version:
#
# Description:
#   This is the glideinFactoryEntryGroup. Common Tasks like querying collector
#   and advertizing the work done by group are done here
#
# Arguments:
#   $1 = poll period (in seconds)
#   $2 = advertize rate (every $2 loops)
#   $3 = glidein submit_dir
#   $4 = entry name
#
# Author:
#   <NAME> (October 2012)
#

import signal
import os
import os.path
import sys
import fcntl
import traceback
import time
import string
import math
import copy
import random
import cPickle
import select
import logging

STARTUP_DIR=sys.path[0]
sys.path.append(os.path.join(STARTUP_DIR,"../../"))

from glideinwms.lib import logSupport
from glideinwms.lib import cleanupSupport
from glideinwms.lib import glideinWMSVersion
from glideinwms.factory import glideFactoryEntry
from glideinwms.factory import glideFactoryConfig as gfc
from glideinwms.factory import glideFactoryLib as gfl
from glideinwms.factory import glideFactoryInterface as gfi
from glideinwms.factory import glideFactoryPidLib
from glideinwms.factory import glideFactoryMonitoring
from glideinwms.factory import glideFactoryDowntimeLib

############################################################
# Memory foot print of a entry process when forked for check_and_perform_work
# Set a conservative limit of 120 MB (based on USCD 2.6 factory Pss of 500 MB)
#   plus a safety factor of 2

ENTRY_MEM_REQ_BYTES = 500000000 * 2
############################################################

class EntryGroup:

    def __init__(self):
        pass

############################################################
def check_parent(parent_pid, glideinDescript, my_entries):
    """
    Check to make sure that we aren't an orphaned process.  If Factory
    daemon has died, then clean up after ourselves and kill ourselves off.

    @type parent_pid: int
    @param parent_pid: pid for the Factory daemon process

    @type glideinDescript: glideFactoryConfig.GlideinDescript
    @param glideinDescript: Object that encapsulates glidein.descript in the Factory root directory

    @type my_entries: dict
    @param my_entries: Dictionary of entry objects keyed on entry name

{'fraction_non_alphanumeric': 0.13321492007104796, 'fraction_numerical': 0.013099467140319716, 'mean_word_length': 4.958994708994709, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6939100', 'n_tokens_mistral': 1373, 'n_tokens_neox': 1295, 'n_words': 473}