チェンジセット 60: trunk/install
- コミット日時:
- 2007/07/29 07:48:39 (17 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/install/perl/getxml2db.pl
r58 r60 53 53 $dbh = DBI->connect($data_source,$DBUser,$DBPass) ||die $DBI::error;; 54 54 55 $dbh->{AutoCommit} = 0;55 #$dbh->{AutoCommit} = 0; 56 56 57 57 my ($content) = get("$uri"); … … 89 89 eval("$_"); 90 90 Jcode::convert(\$item{Title},'euc'); 91 91 92 $programtitlename = $item{Title}; 92 $programtitle = $dbh->quote($item{Title}); 93 #print "$item{Title}\n"; 94 #print "$item{TID}\n"; 93 $programtitlename =~ s/\<\;/</gi; 94 $programtitlename =~ s/\>\;/>/gi; 95 $programtitlename =~ s/\&\;/\&/gi; 96 $programtitle = $dbh->quote($programtitlename); 97 95 98 Jcode::convert(\$item{ChName},'euc'); 96 #print "$item{ChName}\n";97 99 Jcode::convert(\$item{SubTitle},'euc'); 98 $programSubTitle = $dbh->quote($item{SubTitle}); 100 101 #$programSubTitle = $dbh->quote($item{SubTitle}); 102 $programSubTitle = $item{SubTitle}; 99 103 $programSubTitle =~ s/\<\;/</gi; 100 104 $programSubTitle =~ s/\>\;/>/gi; 101 102 #print "$item{SubTitle}\n";103 #print "$item{Count}\n"; 105 $programSubTitle =~ s/\&\;/\&/gi; 106 $programSubTitle = $dbh->quote($programSubTitle); 107 104 108 $offsetmin = $item{StOffset}/60; 105 #print "Offset:$offsetmin (min)\n";106 #print "$item{EdTime}/$item{StTime}\n";107 109 $edtime = &syobocaldate2foltiadate($item{EdTime}); 108 110 $sttime = &syobocaldate2foltiadate($item{StTime}); 109 #print "$sttime-$edtime\n";110 111 $length = &calclength($sttime,$edtime); 111 112 $recstartdate = &calcoffsetdate($sttime ,$offsetmin ); 112 113 $recenddate = &calcoffsetdate($edtime ,$offsetmin ); 113 #print "$recstartdate-$recenddate\n";114 #print "Length:$length(min)\n";115 114 116 115 $stationid = &getstationid($item{ChName}); 117 #print "StationID:$stationid \n";118 116 #サブタイトル追加------------------------------------------------- 119 117 #番組があるか確認 … … 217 215 }#foreach 218 216 219 $oserr = $dbh->commit; 220 217 #$oserr = $dbh->commit; 221 218 ## $dbh->disconnect(); 222 219 trunk/install/perl/recwrap.pl
r44 r60 265 265 #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 266 266 267 268 # トラコンキューイング #2007/7/10 269 my $trcnprocesses = ""; 270 my $cpucores = `ls /proc/acpi/processor | wc -l`; 271 $cpucores =~ s/[^0-9]//gi; 272 unless ($cpucores >= 1 ){ 273 $cpucores = 1; 274 } 275 do { 276 $trcnprocesses = `ps ax | grep ffmpeg | grep -v grep | wc -l `; 277 $trcnprocesses =~ s/[^0-9]//gi; 278 # 既にトラコンプロセスが走っているなら適当に待機 279 if ($trcnprocesses >= $cpucores){ 280 &writelog("recwrap TRCN WAITING :$trcnprocesses / $cpucores :$outputfilename "); 281 sleep 53; 282 sleep $recch; 283 } 284 } until ($trcnprocesses < $cpucores); 285 286 267 287 if (($trconqty eq "")||($trconqty == 0 )){ 268 288 &writelog("recwrap TRCNSTART vfr4psp.sh $recfolderpath/$outputfilename $pspfilname $pspdirname $psptrcn[1]");