Changeset 9893
- Timestamp:
- 06/26/08 14:12:48 (2 months ago)
- Files:
-
- branches/1.0/data/tasks/sfPakeMisc.php (modified) (4 diffs)
- branches/1.0/lib/log/sfLogManager.class.php (modified) (2 diffs)
- branches/1.0/lib/util/sfCore.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/data/tasks/sfPakeMisc.php
r8288 r9893 200 200 201 201 // create a lock file 202 pake_touch($sf_root_dir.'/'.$lock_name.'.lck', ''); 202 $lock_file = $sf_root_dir.'/'.$lock_name.'-cli.lck'; 203 pake_touch($lock_file, ''); 203 204 204 205 // change mode so the web user can remove it if we die 205 pake_chmod($lock_ name.'.lck', $sf_root_dir, 0777);206 pake_chmod($lock_file, '', 0777); 206 207 207 208 // remove cache files … … 209 210 210 211 // release lock 211 pake_remove($ sf_root_dir.'/'.$lock_name.'.lck', '');212 pake_remove($lock_file, ''); 212 213 } 213 214 … … 296 297 $env = $args[1]; 297 298 298 $lockFile = $app.'_'.$env.'. clilock';299 $lockFile = $app.'_'.$env.'.lck'; 299 300 $locks = pakeFinder::type('file')->ignore_version_control()->prune('.svn')->discard('.svn')->maxdepth(0)->name($lockFile)->relative()->in('./'); 300 301 … … 322 323 $env = $args[1]; 323 324 324 $lockFile = $app.'_'.$env.'. clilock';325 $lockFile = $app.'_'.$env.'.lck'; 325 326 326 327 if (!file_exists(sfConfig::get('sf_root_dir').'/'.$lockFile)) 327 328 { 328 pake_touch(sfConfig::get('sf_root_dir').'/'.$lockFile, ' 777');329 pake_touch(sfConfig::get('sf_root_dir').'/'.$lockFile, ''); 329 330 330 331 pake_echo_action('enable', "$app [$env] has been DISABLED"); branches/1.0/lib/log/sfLogManager.class.php
r3329 r9893 77 77 { 78 78 // create a lock file 79 $lock_name = $app.'_'.$env.'.lck'; 80 touch(sfConfig::get('sf_root_dir').'/'.$lock_name); 79 $lockFile = sfConfig::get('sf_root_dir').'/'.$app.'_'.$env.'-cli.lck'; 80 touch($lockFile); 81 chmod($lockFile, 0777); 81 82 82 83 // if log file exists rotate it … … 109 110 } 110 111 } 112 113 unlink($lockFile); 111 114 } 112 115 } branches/1.0/lib/util/sfCore.class.php
r9263 r9893 95 95 static public function checkLock() 96 96 { 97 if (sfToolkit::hasLockFile(SF_ROOT_DIR.DIRECTORY_SEPARATOR.SF_APP.'_'.SF_ENVIRONMENT.'.lck', 5)) 97 if ( 98 sfToolkit::hasLockFile(SF_ROOT_DIR.DIRECTORY_SEPARATOR.SF_APP.'_'.SF_ENVIRONMENT.'-cli.lck', 5) 99 || 100 sfToolkit::hasLockFile(SF_ROOT_DIR.DIRECTORY_SEPARATOR.SF_APP.'_'.SF_ENVIRONMENT.'.lck') 101 ) 98 102 { 99 103 // application is not available