mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 08:39:58 +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()
|
function procDoNotify()
|
||||||
{
|
{
|
||||||
$lockFilePath = $this->cachedir.$this->lockfile;
|
$oController = &getController('module');
|
||||||
if(file_exists($lockFilePath))
|
$output = $oController->lock('commentnotify', 400);
|
||||||
{
|
if(!$output->toBool()) return;
|
||||||
return;
|
$deadline = $output->get('deadline');
|
||||||
}
|
|
||||||
|
|
||||||
$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);
|
|
||||||
|
|
||||||
if( file_exists($this->cachedir.$this->cachefile) )
|
if( file_exists($this->cachedir.$this->cachefile) )
|
||||||
{
|
{
|
||||||
|
|
@ -101,7 +83,7 @@
|
||||||
$this->sendCommentNotify($data->comment_srl);
|
$this->sendCommentNotify($data->comment_srl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FileHandler::removeFile($lockFilePath);
|
$oController->unlock('commentnotify', $deadline);
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteFromQueue($comment_srl)
|
function deleteFromQueue($comment_srl)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue