version 1.1, 2009/05/15 13:13:31
|
version 1.4, 2010/03/23 16:10:03
|
Line 32 from DownloadBasket import DownloadBaske
|
Line 32 from DownloadBasket import DownloadBaske
|
from types import * |
from types import * |
import pickle |
import pickle |
import tempfile |
import tempfile |
|
from cdli_files import CDLIFile |
|
from cdli_files import splitatf,checkFile |
from cdli_helpers import * |
from cdli_helpers import * |
|
|
class BasketContent(SimpleItem): |
class BasketContent(SimpleItem): |
"""classe fuer den Inhalt eines Baskets""" |
"""classe fuer den Inhalt eines Baskets""" |
|
|
Line 134 class uploadATFfinallyThread(Thread):
|
Line 136 class uploadATFfinallyThread(Thread):
|
|
|
self.result="" |
self.result="" |
#find context within ZODB |
#find context within ZODB |
from Zope import DB |
from Zope2 import DB |
conn = DB.open() |
conn = DB.open() |
root = conn.root() |
root = conn.root() |
app = root['Application'] |
app = root['Application'] |
Line 308 class uploadATFThread(Thread):
|
Line 310 class uploadATFThread(Thread):
|
idTmp=self.idTmp |
idTmp=self.idTmp |
self.result="" |
self.result="" |
#find context within ZODB |
#find context within ZODB |
from Zope import DB |
from Zope2 import DB |
conn = DB.open() |
conn = DB.open() |
root = conn.root() |
root = conn.root() |
app = root['Application'] |
app = root['Application'] |
Line 347 class uploadATFThread(Thread):
|
Line 349 class uploadATFThread(Thread):
|
|
|
#make sure that id is a string and not an integer |
#make sure that id is a string and not an integer |
basketId=str(basketId) |
basketId=str(basketId) |
|
logging.info("basketID:"+basketId) |
#TODO: make this configurable, at the moment, rootFolder for cdli has to be cdliRoot |
#TODO: make this configurable, at the moment, rootFolder for cdli has to be cdliRoot |
ctx2=ctx.cdliRoot |
ctx2=ctx.cdliRoot |
|
|
#get temporary file for staging the downloaded and splitted files |
#get temporary file for staging the downloaded and splitted files |
dir=tempfile.mkdtemp() |
dir=tempfile.mkdtemp() |
|
|
|
logging.info("tmpfFile:"+str(dir)) |
changed=[] # changed files |
changed=[] # changed files |
errors=[] # files with errors |
errors=[] # files with errors |
lockerrors=[] # files with errors |
lockerrors=[] # files with errors |
Line 363 class uploadATFThread(Thread):
|
Line 365 class uploadATFThread(Thread):
|
psNotInCatalog=[] # files not in the catalog |
psNotInCatalog=[] # files not in the catalog |
|
|
#split the uploadedd atf file |
#split the uploadedd atf file |
|
logging.info("start splitting") |
basketNameFromFile, numberOfFiles=splitatf(upload,dir,ext=self) |
basketNameFromFile, numberOfFiles=splitatf(upload,dir,ext=self) |
|
|
#find basketId if not set |
#find basketId if not set |