mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
#17896904 : change lock into db lock
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6006 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5c21d8b997
commit
85a0a101d5
1 changed files with 5 additions and 23 deletions
|
|
@ -58,28 +58,10 @@
|
|||
|
||||
function procDoNotify()
|
||||
{
|
||||
$lockFilePath = $this->cachedir.$this->lockfile;
|
||||
if(file_exists($lockFilePath))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$fp = null;
|
||||
if(version_compare(PHP_VERSION, "4.3.2", '<'))
|
||||
{
|
||||
$fp = fopen($lockFilePath, "a");
|
||||
}
|
||||
else
|
||||
{
|
||||
$fp = fopen($lockFilePath, "x");
|
||||
if(!$fp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fwrite($fp, "lock");
|
||||
fclose($fp);
|
||||
$oController = &getController('module');
|
||||
$output = $oController->lock('commentnotify', 400);
|
||||
if(!$output->toBool()) return;
|
||||
$deadline = $output->get('deadline');
|
||||
|
||||
if( file_exists($this->cachedir.$this->cachefile) )
|
||||
{
|
||||
|
|
@ -101,7 +83,7 @@
|
|||
$this->sendCommentNotify($data->comment_srl);
|
||||
}
|
||||
}
|
||||
FileHandler::removeFile($lockFilePath);
|
||||
$oController->unlock('commentnotify', $deadline);
|
||||
}
|
||||
|
||||
function deleteFromQueue($comment_srl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue