Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/a/s/AsyncStageout-HEAD/src/python/AsyncStageOut/TransferDaemon.py   AsyncStageout(Download)
from WMCore.Storage.TrivialFileCatalog import readTFC
from WMCore.WorkerThreads.BaseWorkerThread import BaseWorkerThread
from AsyncStageOut.TransferWorker import TransferWorker
from multiprocessing import Pool
from WMCore.WMFactory import WMFactory
    lfn_pfn_mapping = {}
    try:
        worker = TransferWorker(user, tfc_map, config, list_process, link_process, pfn_lfn_mapping, lfn_pfn_mapping)
    except Exception, e:
        logging.debug("Worker cannot be created!:" %e)
        return user
    if worker.init:
        logging.debug("Starting %s" % worker)
        try:
            worker ()
        while list_process:
            try:
                worker = TransferWorker(user, tfc_map, config, list_process, link_process, pfn_lfn_mapping, lfn_pfn_mapping)
            except Exception, e:
                logging.debug("Worker cannot be created!:" %e)
                continue
            if worker.init:
                logging.debug("Starting %s" % worker)
                try:
                    worker ()

src/a/s/AsyncStageout-HEAD/test/python/AsyncStageOut_t/AsyncTransfer_t.py   AsyncStageout(Download)
from AsyncStageOut.PublisherDaemon import PublisherDaemon
from AsyncStageOut.LFNSourceDuplicator import LFNSourceDuplicator
from AsyncStageOut.TransferWorker import TransferWorker
from AsyncStageOut.AnalyticsDaemon import AnalyticsDaemon
from AsyncStageOut.StatisticDaemon import StatisticDaemon
            site_tfc_map[site] = get_tfc_rules(site)
        # Mark the document as good
        worker = TransferWorker([document['user'], None, None], site_tfc_map, self.config.AsyncTransfer)
        worker.mark_good([document['lfn']])
        query = { 'reduce':False, 'key':[ document['jobid'] , document['job_end_time'] ] }
        stdout_log.close()
        stderr_log.close()
        worker = TransferWorker([file_doc['user'], None, None], site_tfc_map, self.config.AsyncTransfer)
        to_clean = {(str(pfn), str(pfn)): 'T2_IT_Rome'}
        worker.cleanSpace(to_clean)