[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Maposmatic-dev] [PATCH] Get rid of spurious log messages
From: |
Thomas Petazzoni |
Subject: |
Re: [Maposmatic-dev] [PATCH] Get rid of spurious log messages |
Date: |
Fri, 11 Sep 2009 12:30:06 +0200 |
Pulled, pushed and in production, thanks.
Le Thu, 10 Sep 2009 23:54:05 +0200,
David Decotigny <address@hidden> a écrit :
> Should allow ocitysmap to post its log messages from within
> maposmaticd, and should get rid of the 'no handler for logger
> ocitysmap' message.
> ---
> scripts/maposmaticd | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/maposmaticd b/scripts/maposmaticd
> index d5229d9..d7f36f4 100755
> --- a/scripts/maposmaticd
> +++ b/scripts/maposmaticd
> @@ -22,7 +22,7 @@
> # You should have received a copy of the GNU Affero General Public
> License # along with this program. If not, see
> <http://www.gnu.org/licenses/>.
> -import time, os , sys, select, signal, traceback
> +import time, os , sys, select, signal, traceback, logging
> from datetime import datetime, timedelta
>
> from www.maposmatic.models import MapRenderingJob
> @@ -159,6 +159,7 @@ if not os.path.isdir(RENDERING_RESULT_PATH):
> RENDERING_RESULT_PATH)
> sys.exit(1)
>
> +logging.basicConfig()
> LOG.info("started")
>
> # Reset the job that might have been left into the "rendering" state
> @@ -172,6 +173,7 @@ for job in jobs:
>
> last_file_cleanup = None
>
> +
> while True:
> # Test each 20 seconds if we need to cleanup files
> if not last_file_cleanup or last_file_cleanup < (datetime.now()
> - timedelta(0, 20)):
--
Thomas Petazzoni http://thomas.enix.org
Promouvoir et défendre le Logiciel Libre http://www.april.org
Logiciels Libres à Toulouse http://www.toulibre.org
signature.asc
Description: PGP signature