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

Last change on this file since 1316 was 1147, checked in by goya, 11 years ago

adaptation du rythme aux nouvelles regles d'update

File size: 857 bytes
Line 
1#!/bin/bash
2. bin/db.inc
3TMPFILE=/tmp/hard_cache.$$
4
5for url in synthese synthesetri/10 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 http://www.nosdeputes.fr/$url > TMPFILE
9  mv TMPFILE web/$url.html
10done;
11
12for seance_id in $(echo "select DISTINCT seance_id from presence where updated_at > (NOW() - 60*60*5)" | 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 > TMPFILE
17        mv TMPFILE web/seance/$seance_id.html
18done
19rm cache/frontend/prod/template/www_nosdeputes_fr/all/intervention/seance/seance/*
20rm 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.