/** * Decrease the job priority * * @param int $uid The job uid * @return Whether the job priority has been successfully decreased */ function scheduler_job_priority_down($uid) { $status = lib_scheduling_queue_down(lib_scheduling_job_find(lib_scheduling_queue_init(), $uid)); lib_scheduling_queue_close(); if ($status) { lib_scheduling_notice('Scheduler::job_priority_down[success]{' . $uid . '}'); } else { lib_scheduling_warning('Scheduler::job_priority_down[fail]{' . $uid . '}'); } return $status; }
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** * @package ezcast.ezmanager.cli */ include_once 'config.inc'; include_once 'lib_scheduling.php'; include_once 'lib_ezmam.php'; ezmam_repository_path($repository_path); $uid = $argv[1]; $job = lib_scheduling_job_find(scheduler_processing_get(), $uid); $renderer = lib_scheduling_renderer_find(lib_scheduling_renderer_list(), $job['renderer']); $album = $job['album']; $asset = $job['asset']; $asset_meta = ezmam_asset_metadata_get($album, $asset); $job_dir = basename($job['location']); // Send the video to the renderer download dir $cmd = $rsync_pgm . ' -L -r -e ssh -tv --partial-dir=' . $renderer['downloading_dir'] . ' ' . $job['location'] . ' ' . $renderer['client'] . '@' . $renderer['host'] . ':' . $renderer['downloaded_dir'] . ' 2>&1'; // try 3 times for ($i = 0; $i < 3; $i++) { exec($cmd, $out, $err); if ($err) { lib_scheduling_warning('Scheduler::job_perform[wait]{rsync: ' . $cmd . '}(' . $err . ') |::>' . implode("\n", $out) . ' <::|'); sleep(600); } else { break;