Ignore:
Timestamp:
Apr 19, 2020, 4:27:01 PM (7 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, master
Children:
2a31181
Parents:
77cd9cf
Message:

Refactored code to have one gnuboat python structure

File:
1 moved

Legend:

Unmodified
Added
Removed
  • src/gnuboat/mapservice_impl/demo/DbSetup.py

    r77cd9cf r43fd35c  
    11'''
    2     Copyright (C) 2019 - 2020 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
     2    Copyright (C) 2019 - 2020 EngSaS - Langenbach. All rights reserved.
    33
    44    This program is free software: you can redistribute it and/or modify
    … …  
    2020import flask
    2121
    22 from ..database.Model import db, User, ApiKey, Water, OsmType, Gauge, Device, Log, Queue, ProcessingStatus, db_setup
    23 from ..tasks.tasks import log_process
     22from gnuboat.mapservice_impl.database.Model import (
     23    db, User, ApiKey, Water,
     24    OsmType, Gauge, Device, Log, Queue, ProcessingStatus, db_setup
     25)
     26from gnuboat.mapservice_impl.tasks.tasks import log_process
    2427
    2528
    … …  
    127130                location='SRID=4326;POINT(10.0427 48.4275)',
    128131                reference_water_level_gauge_height=0.4,
    129                 comment=
    130                 'Level zero is the level of the step where the handrail is fixed.'
     132                comment=('Level zero is the level of the step '
     133                         'where the handrail is fixed.')
    131134            )
    132135            db.session.add(pfuhlersee_gauge)
    … …  
    184187    db.session.commit()
    185188
    186     if not 'CELERY_BROKER_URL' in flask.current_app.config or not flask.current_app.config[
    187         'CELERY_BROKER_URL']:
     189    if ('CELERY_BROKER_URL' not in flask.current_app.config or
     190        not flask.current_app.config[
     191           'CELERY_BROKER_URL']):
    188192        print('Do not add log, since their is no CELERY_BROKER_URL configured')
    189193        return log
Note: See TracChangeset for help on using the changeset viewer.