Exemplo n.º 1
0
    def rewardCB(self, reward, synced):

        responses = node.handleReward(self, reward, synced)

        for userId, messages in responses.items():

            for message in messages:
                self.sendMessage(userId, message)
Exemplo n.º 2
0
    def rewardCB(self, reward, distance):

        responses = node.handleReward(self, reward, distance)

        for userId, messages in responses.items():

            for message in messages:
                self.sendMessage(userId, message)

        start = int(time.time() - 43200)  # 12 hours of collecting
        total = self.rewardList.getRewardCount(start=start)
        nList = self.rewardList.getRewardCount(start=start, source=1)
        if nList and total:
            self.aberration = 1 - (nList / total)
Exemplo n.º 3
0
    def rewardCB(self, reward, distance):

        responses = node.handleReward(self, reward, distance)

        for userId, messages in responses.items():

            member = self.findMember(userId)

            if member:

                for message in messages:
                    asyncio.run_coroutine_threadsafe(self.sendMessage(
                        member, message),
                                                     loop=self.client.loop)
Exemplo n.º 4
0
    def rewardCB(self, reward, distance):

        responses = node.handleReward(self, reward, distance)

        for userId, messages in responses.items():

            member = self.findMember(userId)

            if member:

                for message in messages:
                        asyncio.run_coroutine_threadsafe(self.sendMessage(member, message), loop=self.client.loop)

        start = int(time.time() - 43200) # 12 hours of collecting
        total = self.rewardList.getRewardCount(start = start)
        nList = self.rewardList.getRewardCount(start = start, source=1)
        if nList and total:
            self.aberration = 1 - ( nList / total)