mò Ä%ÜGc@sâdZdkZdkZdkZdkZdkZdkZdkZdkl Z dk l Z l Z e Zd„ZdkZeiƒZddd„ZdklZdefd„ƒYZd klZd efd „ƒYZdS( iN(s StorageServer(s FileStoragesTempFileStoragecsntiƒiƒoWt‰‡d†}tid|ƒ‰ˆi ƒ‡‡d†}dk }|i |ƒndS(NcsEˆo tˆƒptƒ}yt|ƒiƒWn t}nXdS(N(tdb_patht FileStoragetTempFileStoragetstt StorageServertservetFalset _runningDurus(RR(R(t</home/holguin2/public_html/spyce/contrib/modules/spydurus.pyt_maybeStartDurus"s ttargetcs?ˆo*dkl}l}l}|||ƒnˆiƒdS(N(s stop_duruss DEFAULT_HOSTs DEFAULT_PORT(Rtdurus.run_durust stop_durust DEFAULT_HOSTt DEFAULT_PORTt_ttjoin(R R R(RR(Rt_cleanup+s( tspycet getServertthreadedtTrueRR t threadingtThreadRtstartRtatexittregister(RRRRRR ((RRRRtmaybeStartDuruss   csédkl}tiƒiƒoudkl}xžt|dƒD]O}t i ƒ|joPnyt i ||ƒƒƒWq>t idƒq>Xq>Wn:ti‡d†ƒ}|p d‚nt i ||ƒƒt i ƒp d‚ndS( sFif another process takes care of durus, you never need to pass db_path(s Connection(s ClientStorageif0.5cs tˆƒS(N(RR((R(RtDss&timeout while getting durus connectionsno durus connections createdN(tdurus.connectiont ConnectionRRRtdurus.client_storaget ClientStoragetranget connectionstitqtqsizetputttimetsleept spyceUtilt tryForAwhileR(R"RR R#RR((RRtinitPool6s$    (s spyceModuletspyduruscBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCsRd|_ytiddƒ|_Wntij o d‚nX|iiƒdS(Nttimeouti s&timeout while getting durus connection(tNonetselftconnR$tgettQueuetEmptytabort(R/((RROs   cCsti|iƒdS(N(R$R&R/R0(R/terr((Rtfinish[scCs |iiƒS(N(R/R0tget_root(R/((Rtroot^scCs|iit|ƒƒS(s/oid should be a formatted oid, not a raw _p_oidN(R/R0R1tinttoid(R/R:((RR1ascCs|iiƒdS(N(R/R0tcommit(R/((RR;es(t__name__t __module__RR6R8R1R;(((RR,Ns    (s PersistenttPersistentWithIdcBstZd„ZRS(NcCs |iƒS(N(R/t _p_format_oid(R/((Rtidls(R<R=R@(((RR>js(t CONNECTIONStsystostos.pathRR'RR)tdurus.storage_serverRtdurus.file_storageRRRRRR2R$R.R+t spyceModuleR,tdurus.persistentt PersistentR>(RBRRGR)RR+RR,R2RIRRARR>R$R'RCRR((Rt? s-