当前位置: 首页>>代码示例>>Python>>正文


Python Sender.__init__方法代码示例

本文整理汇总了Python中sender.Sender.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Sender.__init__方法的具体用法?Python Sender.__init__怎么用?Python Sender.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sender.Sender的用法示例。


在下文中一共展示了Sender.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from sender import Sender [as 别名]
# 或者: from sender.Sender import __init__ [as 别名]
 def __init__(self, config, log):
     Sender.__init__(self, config, log)
     self.access_key = config.get('Messenger', 'gcm_access_key')
     self.base_deeplink_url = config.get('Messenger', 'base_deeplink_url')
     self.gcm = GCM(self.access_key)
     self.canonical_ids = []
     self.unregistered_devices = []
开发者ID:bytearchive,项目名称:pushkin,代码行数:9,代码来源:gcm_push_sender.py

示例2: __init__

# 需要导入模块: from sender import Sender [as 别名]
# 或者: from sender.Sender import __init__ [as 别名]
 def __init__(self, config, log):
     Sender.__init__(self, config, log)
     self.sandbox = config.getboolean('Messenger', 'apns_sandbox')
     self.certificate_path = config.get('Messenger', 'apns_certificate_path')
     self.topic = config.get('Messenger', 'apns_topic')
     self.apn = APNsClient(self.certificate_path, use_sandbox=self.sandbox, log=log)
     self.canonical_ids = []
     self.unregistered_devices = []
开发者ID:Nordeus,项目名称:pushkin,代码行数:10,代码来源:apns2_push_sender.py

示例3: __init__

# 需要导入模块: from sender import Sender [as 别名]
# 或者: from sender.Sender import __init__ [as 别名]
    def __init__(self, config, log):
        """
        APNs Push Sender uses MODIFIED (watch out if you want to update it) PyAPNs module: https://github.com/djacobs/PyAPNs
        APNs documentation: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW4
        """
        Sender.__init__(self, config, log)
        self.sent_queue = {}
        self.batch_size = int(config.get('Messenger', 'apns_batch_size'))
        self.sandbox = config.get('Messenger', 'apns_sandbox') == 'true'
        self.certificate_path = config.get('Messenger', 'apns_certificate_path')

        set_logger(log)

        self.apns = APNs(use_sandbox=self.sandbox, cert_file=self.certificate_path, enhanced=True,
                         write_retries=self.connection_error_retries)
        self.apns.gateway_server.register_response_listener(self.process_malformed_notification)
        self.apns.gateway_server.register_error_listener(self.process_failed_notification)
开发者ID:srdjan-bozovic,项目名称:pushkin,代码行数:19,代码来源:apns_push_sender.py

示例4: __init__

# 需要导入模块: from sender import Sender [as 别名]
# 或者: from sender.Sender import __init__ [as 别名]
    def __init__(self, tsid, ssid):
        Sender.__init__(self, tsid, ssid)
        self.mid = ""
        self.timer = Timer()
        self.uid2player = {}
        self.presenter = None
        self.cache_billboard = {}
        self.cc = CacheCenter(tsid, ssid)
        self.mode = Question

        self.idle_state = IdleState(self)
        self.ready_state = ReadyState(self)
        self.timing_state = TimingState(self)
        self.timeup_state = TimeupState(self)
        self.statistics_state = StatisticsState(self)
        self.answer_state = AnswerState(self)
        self.announce_state = AnnounceState(self)
        self.award_state = AwardState(self)
        self.ending_state = EndingState(self)
        self.state = self.idle_state

        self.SetState(self.idle_state)
        self.loopGetBillboard()
开发者ID:lsaint,项目名称:millionaire,代码行数:25,代码来源:room.py

示例5: __init__

# 需要导入模块: from sender import Sender [as 别名]
# 或者: from sender.Sender import __init__ [as 别名]
 def __init__(self):
     Sender.__init__(self, 0, 0)
     self.ssid2room = {}
     self.uid2ssid = {}
     self.ssid2flag = {}
     self.loadCache()
开发者ID:lsaint,项目名称:millionaire,代码行数:8,代码来源:watchdog.py

示例6: __init__

# 需要导入模块: from sender import Sender [as 别名]
# 或者: from sender.Sender import __init__ [as 别名]
    def __init__(self, tsid, ssid):
        Sender.__init__(self, tsid, ssid)
        self.timer = Timer()
        self.cc = CacheCenter(tsid, ssid)

        self.reset(True)
开发者ID:lsaint,项目名称:millionaire,代码行数:8,代码来源:flag.py


注:本文中的sender.Sender.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。