Index: trunk/install/perl/getxml2db.pl =================================================================== --- trunk/install/perl/getxml2db.pl (リビジョン 58) +++ trunk/install/perl/getxml2db.pl (リビジョン 60) @@ -53,5 +53,5 @@ $dbh = DBI->connect($data_source,$DBUser,$DBPass) ||die $DBI::error;; -$dbh->{AutoCommit} = 0; +#$dbh->{AutoCommit} = 0; my ($content) = get("$uri"); @@ -89,31 +89,29 @@ eval("$_"); Jcode::convert(\$item{Title},'euc'); + $programtitlename = $item{Title}; -$programtitle = $dbh->quote($item{Title}); -#print "$item{Title}\n"; -#print "$item{TID}\n"; +$programtitlename =~ s/\<\;//gi; +$programtitlename =~ s/\&\;/\&/gi; +$programtitle = $dbh->quote($programtitlename); + Jcode::convert(\$item{ChName},'euc'); -#print "$item{ChName}\n"; Jcode::convert(\$item{SubTitle},'euc'); -$programSubTitle = $dbh->quote($item{SubTitle}); + +#$programSubTitle = $dbh->quote($item{SubTitle}); +$programSubTitle = $item{SubTitle}; $programSubTitle =~ s/\<\;//gi; - -#print "$item{SubTitle}\n"; -#print "$item{Count}\n"; +$programSubTitle =~ s/\&\;/\&/gi; +$programSubTitle = $dbh->quote($programSubTitle); + $offsetmin = $item{StOffset}/60; -#print "Offset:$offsetmin (min)\n"; -#print "$item{EdTime}/$item{StTime}\n"; $edtime = &syobocaldate2foltiadate($item{EdTime}); $sttime = &syobocaldate2foltiadate($item{StTime}); -#print "$sttime-$edtime\n"; $length = &calclength($sttime,$edtime); $recstartdate = &calcoffsetdate($sttime ,$offsetmin ); $recenddate = &calcoffsetdate($edtime ,$offsetmin ); -#print "$recstartdate-$recenddate\n"; -#print "Length:$length(min)\n"; $stationid = &getstationid($item{ChName}); -#print "StationID:$stationid \n"; #サブタイトル追加------------------------------------------------- #番組があるか確認 @@ -217,6 +215,5 @@ }#foreach -$oserr = $dbh->commit; - +#$oserr = $dbh->commit; ## $dbh->disconnect(); Index: trunk/install/perl/recwrap.pl =================================================================== --- trunk/install/perl/recwrap.pl (リビジョン 44) +++ trunk/install/perl/recwrap.pl (リビジョン 60) @@ -265,4 +265,24 @@ #2006/12/03_10:30:24 recwrap TRCNSTART vfr4psp.sh /home/foltia/php/tv/591-87-20061203-1000.m2p -591-87-20061203-1000 /home/foltia/php/tv/591.localized/mp4/ 3 + +# トラコンキューイング #2007/7/10 +my $trcnprocesses = ""; +my $cpucores = `ls /proc/acpi/processor | wc -l`; +$cpucores =~ s/[^0-9]//gi; +unless ($cpucores >= 1 ){ + $cpucores = 1; +} +do { + $trcnprocesses = `ps ax | grep ffmpeg | grep -v grep | wc -l `; + $trcnprocesses =~ s/[^0-9]//gi; + # 既にトラコンプロセスが走っているなら適当に待機 + if ($trcnprocesses >= $cpucores){ + &writelog("recwrap TRCN WAITING :$trcnprocesses / $cpucores :$outputfilename "); + sleep 53; + sleep $recch; + } +} until ($trcnprocesses < $cpucores); + + if (($trconqty eq "")||($trconqty == 0 )){ &writelog("recwrap TRCNSTART vfr4psp.sh $recfolderpath/$outputfilename $pspfilname $pspdirname $psptrcn[1]");