Ejemplo n.º 1
0
def main():
    utils.set_task_queue_module('default')
    apps = (
        handlers_endpoints.create_endpoints_app(),
        handlers_cron.create_cron_app(),
        handlers_queues.create_queues_app(),
    )
    for app in apps:
        gae_ts_mon.initialize(app=app, is_enabled_fn=is_enabled_callback)
    gae_event_mon.initialize('gce-backend')
    metrics.initialize()
    return apps
Ejemplo n.º 2
0
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import webapp2

import gae_ts_mon
import gae_event_mon
from appengine_module.test_results.handlers import monitoring

routes = [
    ('/internal/monitoring/upload', monitoring.EventMonUploader),
]

app = webapp2.WSGIApplication(routes, debug=True)
gae_ts_mon.initialize(app)
gae_event_mon.initialize('test-results')
Ejemplo n.º 3
0
from google.appengine.api import app_identity
from handlers import flake_issues
from handlers import migrate
from handlers.all_flake_occurrences import AllFlakeOccurrences
from handlers.cron_dispatch import CronDispatch
from handlers.index import Index
from handlers.post_comment import PostComment
from handlers.search import Search

handlers = [
    (r'/', Index),
    (r'/post_comment', PostComment),
    (r'/all_flake_occurrences', AllFlakeOccurrences),
    (r'/search', Search),
    (r'/cron/(.*)', CronDispatch),
    (r'/issues/process/(.*)', flake_issues.ProcessIssue),
    (r'/issues/update-if-stale/(.*)', flake_issues.UpdateIfStaleIssue),
    (r'/issues/create_flaky_run', flake_issues.CreateFlakyRun),
    (r'/override_issue_id', flake_issues.OverrideIssueId),
    (r'/migrate', migrate.Migrate),
]


def is_monitoring_enabled():
    return not app_identity.get_application_id().endswith('-staging')


app = webapp2.WSGIApplication(handlers, debug=True)
gae_ts_mon.initialize(app, is_enabled_fn=is_monitoring_enabled)
gae_event_mon.initialize('flakiness_pipeline')
Ejemplo n.º 4
0
def initialize():
    gae_event_mon.initialize('swarming')
Ejemplo n.º 5
0
sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'gae-pytz'))
sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'google-api-python-client'))
sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'httplib2', 'python2'))
sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'oauth2client'))
sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'six'))
sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'test_results'))
sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'time_functions'))
sys.path.insert(0, os.path.join(THIRD_PARTY_DIR, 'uritemplate'))

from handlers.cron_dispatch import CronDispatch
from handlers.index import Index
from handlers.post_comment import PostComment
from handlers.all_flake_occurrences import AllFlakeOccurrences
from handlers.search import Search
from handlers import flake_issues

handlers = [
  (r'/', Index),
  (r'/post_comment', PostComment),
  (r'/all_flake_occurrences', AllFlakeOccurrences),
  (r'/search', Search),
  (r'/cron/(.*)', CronDispatch),
  (r'/issues/process/(.*)', flake_issues.ProcessIssue),
  (r'/issues/update-if-stale/(.*)', flake_issues.UpdateIfStaleIssue),
  (r'/issues/create_flaky_run', flake_issues.CreateFlakyRun),
]

app = webapp2.WSGIApplication(handlers, debug=True)
gae_ts_mon.initialize(app)
gae_event_mon.initialize('flakiness_pipeline')