當前位置: 首頁>>代碼示例>>Python>>正文


Python Service.check_available方法代碼示例

本文整理匯總了Python中hypermap.aggregator.models.Service.check_available方法的典型用法代碼示例。如果您正苦於以下問題:Python Service.check_available方法的具體用法?Python Service.check_available怎麽用?Python Service.check_available使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在hypermap.aggregator.models.Service的用法示例。


在下文中一共展示了Service.check_available方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setUp

# 需要導入模塊: from hypermap.aggregator.models import Service [as 別名]
# 或者: from hypermap.aggregator.models.Service import check_available [as 別名]
    def setUp(self):

        signals.post_save.disconnect(layer_post_save, sender=Layer)
        signals.post_save.disconnect(service_post_save, sender=Service)

        for s in range(0, SERVICE_NUMBER):
            service = Service(
                url='http://%s.fakeurl.com' % s,
                title='Title %s' % s,
                type='OGC:WMS',
            )
            service.save()
            for l in range(0, LAYER_PER_SERVICE_NUMBER):
                layer = Layer(
                    name='Layer %s, from service %s' % (l, s),
                    bbox_x0=-179,
                    bbox_x1=179,
                    bbox_y0=-89,
                    bbox_y1=89,
                    service=service
                )
                layer.save()
                service.layer_set.add(layer)
        for c in range(0, TIMES_TO_CHECK):
            for s in range(0, SERVICE_NUMBER):
                service = Service.objects.all()[s]
                service.check_available()
                for layer in service.layer_set.all():
                    layer.check_available()
開發者ID:o19s,項目名稱:HHypermap,代碼行數:31,代碼來源:test_page_render.py

示例2: setUp

# 需要導入模塊: from hypermap.aggregator.models import Service [as 別名]
# 或者: from hypermap.aggregator.models.Service import check_available [as 別名]
    def setUp(self):

        signals.post_save.disconnect(layer_post_save, sender=Layer)
        signals.post_save.disconnect(service_post_save, sender=Service)

        catalog, created = Catalog.objects.get_or_create(
            name="hypermap", slug="hypermap",
            url="search_api"
        )

        for s in range(0, SERVICE_NUMBER):
            service = Service(
                url='http://%s.fakeurl.com' % s,
                title='Title %s' % s,
                type='OGC:WMS',
                catalog=catalog
            )
            service.save()
            for l in range(0, LAYER_PER_SERVICE_NUMBER):
                layer = Layer(
                    name='Layer %s, from service %s' % (l, s),
                    bbox_x0=-179,
                    bbox_x1=179,
                    bbox_y0=-89,
                    bbox_y1=89,
                    service=service,
                    catalog=service.catalog
                )
                layer.save()
                service.layer_set.add(layer)
        for c in range(0, TIMES_TO_CHECK):
            for s in range(0, SERVICE_NUMBER):
                service = Service.objects.all()[s]
                service.check_available()
                for layer in service.layer_set.all():
                    layer.check_available()
開發者ID:JorgeMartinezG,項目名稱:HHypermap,代碼行數:38,代碼來源:test_page_render.py


注:本文中的hypermap.aggregator.models.Service.check_available方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。