Changeset 417aa0d in osmose-backend


Ignore:
Timestamp:
Jan 6, 2013 5:49:17 PM (7 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
f7e40c9
Parents:
f46f22b
git-author:
Frédéric Rodrigo <frodrigo@…> (02/01/2013 23:12:00)
git-committer:
Jocelyn Jaubert <jocelyn.jaubert@…> (06/01/2013 17:49:17)
Message:

Facto analyse start date

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • analysers/Analyser_Osmosis.py

    rd7a7c21 r417aa0d  
    2424import psycopg2 
    2525import psycopg2.extras 
    26 import time 
    2726import string 
    2827from collections import defaultdict 
     
    9897        self.giscurs.execute("SET search_path TO %s,public;" % self.config.db_schema) 
    9998 
    100         self.error_file.analysers({"timestamp":time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())}) 
     99        self.error_file.analysers() 
    101100 
    102101 
    103102    def pre_analyser(self, mode): 
    104         self.error_file.analyser(mode, {"timestamp":time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())}) 
     103        self.error_file.analyser(mode) 
    105104 
    106105 
  • analysers/analyser_sax.py

    rf46f22b r417aa0d  
    2323from Analyser import Analyser 
    2424 
    25 import re, sys, os, time 
     25import re, sys, os 
    2626from modules import OsmoseLog 
    2727from modules import OsmoseErrorFile 
     
    430430    def _load_output(self): 
    431431        self.error_file = OsmoseErrorFile.ErrorFile(self.config) 
    432         self.error_file.analysers({"timestamp":time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())}) 
    433         self.error_file.analyser("analyserChange" if self.parsing_change_file else "analyser", {"timestamp":time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())}) 
     432        self.error_file.analysers() 
     433        self.error_file.analyser("analyserChange" if self.parsing_change_file else "analyser") 
    434434 
    435435        # Création des classes dans le fichier des erreurs 
  • modules/OsmoseErrorFile.py

    rf46f22b r417aa0d  
    2020########################################################################### 
    2121 
    22 import bz2 
     22import bz2, time 
    2323 
    2424import OsmSax 
     
    3131        self.geom_type_renderer = {"node": self.node, "way": self.way, "relation": self.relation, "position": self.position} 
    3232 
    33     def analysers(self, args): 
     33    def analysers(self): 
    3434        if self.config.dst.endswith(".bz2"): 
    3535            output = bz2.BZ2File(self.config.dst, "w") 
     
    3838        self.outxml = OsmSax.OsmSaxWriter(output, "UTF-8") 
    3939        self.outxml.startDocument() 
    40         self.outxml.startElement("analysers", args) 
     40        self.outxml.startElement("analysers", {"timestamp":time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())}) 
    4141 
    4242    def analysers_end(self): 
     
    4444        self.outxml._out.close() 
    4545 
    46     def analyser(self, mode, args): 
    47         self.outxml.startElement(mode, args) 
     46    def analyser(self, mode): 
     47        self.outxml.startElement(mode, {"timestamp":time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())}) 
    4848 
    4949    def analyser_end(self, mode): 
Note: See TracChangeset for help on using the changeset viewer.