Changeset 2535


Ignore:
Timestamp:
Dec 4, 2011, 4:08:37 PM (9 years ago)
Author:
komodo
Message:

fix update questions

Location:
cpc/branches/senat/project/batch/questions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpc/branches/senat/project/batch/questions/compute_latest.sh

    r2034 r2535  
    1414
    1515if [[ $1 -eq "all" ]]; then
    16   sql_string='SELECT source FROM question_ecrite WHERE reponse = "" AND motif_retrait IS NULL'
     16  sql_string='SELECT source FROM question WHERE (reponse = "" OR reponse IS NULL) AND motif_retrait IS NULL'
    1717else
    18   sql_string='SELECT source FROM question_ecrite WHERE question IS NULL OR (reponse = "" AND motif_retrait IS NULL AND date > DATE_SUB(CURDATE(), INTERVAL 75 DAY))'
     18  sql_string='SELECT source FROM question WHERE question IS NULL OR ((reponse = "" OR reponse IS NULL) AND motif_retrait IS NULL AND date > DATE_SUB(CURDATE(), INTERVAL 75 DAY))'
    1919fi
    2020echo $sql_string | mysql $MYSQLID $DBNAME | grep -v source > liste_sans_reponse.txt
    2121
    22 date_from=`echo "SELECT date FROM question_ecrite order by date DESC limit 1" | mysql $MYSQLID $DBNAME | grep -v date`
     22date_from=`echo "SELECT date FROM question ORDER BY date DESC limit 1" | mysql $MYSQLID $DBNAME | grep -v date`
    2323perl download_questions_from_recherche.pl $date_from
    2424
  • cpc/branches/senat/project/batch/questions/download_questions_from_recherche.pl

    r2122 r2535  
    108108foreach $url (split /\n/, $string) {
    109109  $count2++;
    110   #download_one($url);
     110  download_one($url);
    111111}
    112112print $count2." questions sans réponse retéléchargées\n\n" if ($verbose);
Note: See TracChangeset for help on using the changeset viewer.