def ping(*args):
count = 0
try:
for message in Announcementss.select():
count += 1
print count
if count == store.get('announcements')['count']:
print 'yeah'
osc.sendMsg(
'/message',
[''.join('yeah'), ],
port=3002)
else:
kwargs = {'title': 'hey', 'message': 'New Devotion in ', 'ticker': 'New Devotion','timeout':4}
print 'nah'
store.put('announcements',count=count)
notification.notify(**kwargs)
vibrator.vibrate(.5)
except peewee.OperationalError:
print('cant connect')
else:
pass
评论列表
文章目录