source: cpc/trunk/project/bin/update_hardcache @ 2686

Last change on this file since 2686 was 2643, checked in by goya, 9 years ago

reindexe une séance; fix hardcache

File size: 997 bytes
Line 
1#!/bin/bash
2. bin/db.inc
3TMPFILE=/tmp/hard_cache.$$
4
5for url in synthese synthesetri/10 synthesetri/11 synthesetri/12 synthesetri/1 synthesetri/2 synthesetri/3 synthesetri/4 synthesetri/5 synthesetri/6 synthesetri/7 synthesetri/8 synthesetri/9;
6do 
7  rm web/$url.html
8  curl --max-time 90 "http://www.nosdeputes.fr/$url?_sf_ignore_cache=$$" > $TMPFILE 2>> /tmp/update_curl_output.txt
9  mv $TMPFILE web/$url.html
10done;
11
12for seance_id in $(echo "select DISTINCT seance_id from intervention where updated_at > SUBTIME(NOW(),'4:0:0')" | mysql $MYSQLID $DBNAME | grep -v seance_id )
13do
14        echo "http://www.nosdeputes.fr/seance/$seance_id"
15        rm web/seance/$seance_id.html 2> /dev/null
16        curl -q "http://www.nosdeputes.fr/seance/$seance_id?_sf_ignore_cache=$$" > $TMPFILE
17        mv $TMPFILE web/seance/$seance_id.html
18done
19rm -f cache/frontend/prod/template/www_nosdeputes_fr/all/intervention/seance/seance/*
20rm -f cache/frontend/prod/template/www_nosdeputes_fr/all/sf_cache_partial/plot/__groupes/sf_cache_key/*
21
Note: See TracBrowser for help on using the repository browser.