/opt/imunify360/venv/lib/python3.11/site-packages/lockfile/__pycache__
NameSizeModeActions
linklockfile.cpython-311.pyc41940644editdlrm
mkdirlockfile.cpython-311.pyc49340644editdlrm
pidlockfile.cpython-311.pyc73240644editdlrm
sqlitelockfile.cpython-311.pyc71480644editdlrm
symlinklockfile.cpython-311.pyc38360644editdlrm
__init__.cpython-311.pyc130220644editdlrm
Edit: /opt/imunify360/venv/lib/python3.11/site-packages/lockfile/__pycache__/pidlockfile.cpython-311.pyc (7324B)
§ £/Õ˜ónãó|—dZddlmZddlZddlZddlZddlmZmZm Z m Z m Z m Z Gd„de¦«Z d„Zd „Zd „ZdS) z8 Lockfile behaviour implemented via Unix PID files. é)Úabsolute_importNé)ÚLockBaseÚ AlreadyLockedÚ LockFailedÚ NotLockedÚ NotMyLockÚ LockTimeoutcó@—eZdZdZd d„Zd„Zd„Zd„Zd d„Zd „Z d „Z dS) Ú PIDLockFileaA Lockfile implemented as a Unix PID file. The lock file is a normal file named by the attribute `path`. A lock's PID file contains a single line of text, containing the process ID (PID) of the process that acquired the lock. >>> lock = PIDLockFile('somefile') >>> lock = PIDLockFile('somefile') FNcóL—tj||d|¦«|j|_dS)NF)rÚ__init__ÚpathÚ unique_name)ÚselfrÚthreadedÚtimeouts út/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib/python3.11/site-packages/lockfile/pidlockfile.pyrzPIDLockFile.__init__$s+€õ Ô˜$  e¨WÑ5Ô5Ð5Øœ9ˆÔÐÐócó*—t|j¦«S)z- Get the PID from the lock file. )Úread_pid_from_pidfiler©rs rÚread_pidzPIDLockFile.read_pid*s€õ% T¤YÑ/Ô/Ð/rcóJ—tj |j¦«S)zv Test if the lock is currently held. The lock is held if the PID file for this lock exists. )ÚosrÚexistsrs rÚ is_lockedzPIDLockFile.is_locked/s€õ Œw�~Š~˜dœiÑ(Ô(Ð(rcó|—| ¦«o(tj¦«| ¦«kS)z¡ Test if the lock is held by the current process. Returns ``True`` if the current process ID matches the number stored in the PID file. )rrÚgetpidrrs rÚ i_am_lockingzPIDLockFile.i_am_locking7s,€ð �~Š~ÑÔÐB¥B¤I¡K¤K°4·=²=±?´?Ò$BÐBrcóæ—|�|n|j}tj¦«}|� |dkr||z } t|j¦«dS#t$r¡}|jt jkrktj¦«|kr6|�|dkrtd|jz¦«‚td|jz¦«‚tj |dur|dz pd¦«ntd|jz¦«‚Yd}~nd}~wwxYwŒÆ) z† Acquire the lock. Creates the PID file for this lock, or raises an error if the lock could not be acquired. NrTz&Timeout waiting to acquire lock for %sz%s is already lockedé gš™™™™™¹?zfailed to create %s) rÚtimeÚwrite_pid_to_pidfilerÚOSErrorÚerrnoÚEEXISTr rÚsleepr)rrÚend_timeÚexcs rÚacquirezPIDLockFile.acquire?s@€ð%Ð0�'�'°d´lˆÝ”9‘;”;ˆØ Ð  7¨Q¢; ;Ø ˜Ñ ˆHð ð Ý$ T¤YÑ/Ô/Ð/ð �øõð Hð Hð HØ”9¥¤ Ò,Ð,å”y‘{”{ XÒ-Ð-Ø"Ð.°7¸Q²;°;Ý"-ð/=à.2¬iñ/8ñ#9ô#9ð9õ#0Ð0FØ04´ ñ1:ñ#;ô#;ð;å”J˜w¨dÐ2ÐC°wÀ±|ÐJÀsÑKÔKÐKÐKå$Ð%:¸T¼YÑ%FÑGÔGÐGðLÐKÐKÐKÐKøøøøð Høøøð s®AÁ C/ÁBC*Ã*C/cóÚ—| ¦«std|jz¦«‚| ¦«st d|jz¦«‚t |j¦«dS)z¥ Release the lock. Removes the PID file to release the lock, or raises an error if the current process does not hold the lock. z%s is not lockedz%s is locked, but not by meN)rrrr r Úremove_existing_pidfilers rÚreleasezPIDLockFile.release_sm€ð�~Š~ÑÔð <ÝÐ.°´Ñ:Ñ;Ô;Ð ;Ø× Ò Ñ"Ô"ð GÝÐ9¸D¼IÑEÑFÔFÐ FÝ ¤ Ñ*Ô*Ð*Ð*Ð*rcó.—t|j¦«dS)z‚ Break an existing lock. Removes the PID file if it already exists, otherwise does nothing. N)r-rrs rÚ break_lockzPIDLockFile.break_lockls€õ  ¤ Ñ*Ô*Ð*Ð*Ð*r)FN)N) Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrr r+r.r0©rrr r s•€€€€€ððð%ð%ð%ð%ð 0ð0ð0ð )ð)ð)ðCðCðCððððð@ +ð +ð +ð+ð+ð+ð+ð+rr có—d} t|d¦«}| ¦« ¦«} t|¦«}n#t$rYnwxYw| ¦«n#t $rYnwxYw|S)zï Read the PID recorded in the named PID file. Read and return the numeric PID recorded as text in the named PID file. If the PID file cannot be read, or if the content is not a valid PID, return ``None``. NÚr)ÚopenÚreadlineÚstripÚintÚ ValueErrorÚcloseÚIOError)Ú pidfile_pathÚpidÚpidfileÚlines rrrvs¦€ð €CðÝ�| SÑ)Ô)ˆð×ÒÑ!Ô!×'Ò'Ñ)Ô)ˆð Ý�d‘)”)ˆCˆCøÝð ð ð Ø ˆDð øøøà� Š ‰Œˆˆøõ% ð ð ð Ø ˆð øøøð( €Js"„A0»A Á AÁAÁ0 A=Á<A=có*—tjtjztjz}d}tj|||¦«}tj|d¦«}tj¦«}| d|z¦«| ¦«dS)u° Write the PID in the named PID file. Get the numeric process ID (“PIDâ€�) of the current process and write it to the named file as a line of text. i¤Úwz%s N) rÚO_CREATÚO_EXCLÚO_WRONLYr8ÚfdopenrÚwriter=)r?Ú open_flagsÚ open_modeÚ pidfile_fdrAr@s rr$r$˜sv€õ”*�rœyÑ(­2¬;Ñ6€JØ€IÝ”˜ z°9Ñ=Ô=€JÝŒi˜  CÑ(Ô(€Gõ Œ)‰+Œ+€CØ ‡M‚M�&˜3‘,ÑÔÐØ ‡M‚M�O„O€O€O€OrcóŽ— tj|¦«dS#t$r"}|jtjkrn‚Yd}~dSd}~wwxYw)zÏ Remove the named PID file if it exists. Removing a PID file that doesn't already exist puts us in the desired state, so we ignore the condition if the file does not exist. N)rÚremover%r&ÚENOENT)r?r*s rr-r-°s`€ðÝ Œ �,ÑÔÐÐÐøÝ ðððØ Œ9�œ Ò $Ð $Ø à ð ˆDˆDˆDˆDˆDøøøøðøøøs‚˜ A¢?¿A)r4Ú __future__rr&rr#Úrrrrr r r rr$r-r5rrúrRsùðððð'Ð&Ð&Ð&Ð&Ð&à € € € Ø € € € Ø € € € ðððððððððððððððððZ+ðZ+ðZ+ðZ+ðZ+�(ñZ+ôZ+ðZ+ðzðððDððð0ððððr