mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-24 03:00:15 +00:00
Scheduler waits too longer, and pubsubstate registration was backwards
This commit is contained in:
parent
cff3079a04
commit
82a3918aa4
3 changed files with 6 additions and 3 deletions
|
@ -40,8 +40,8 @@ class PubsubStateEvent(ElementBase):
|
||||||
plugin_attrib_map = {}
|
plugin_attrib_map = {}
|
||||||
plugin_tag_map = {}
|
plugin_tag_map = {}
|
||||||
|
|
||||||
stanzaPlugin(Message, PubsubState)
|
stanzaPlugin(Message, PubsubStateEvent)
|
||||||
stanzaPlugin(PubsubState, PubsubStateEvent)
|
stanzaPlugin(PubsubStateEvent, PubsubState)
|
||||||
|
|
||||||
class Pubsub(ElementBase):
|
class Pubsub(ElementBase):
|
||||||
namespace = 'http://jabber.org/protocol/pubsub'
|
namespace = 'http://jabber.org/protocol/pubsub'
|
||||||
|
|
|
@ -49,7 +49,7 @@ class Scheduler(object):
|
||||||
self.run = True
|
self.run = True
|
||||||
while self.run:
|
while self.run:
|
||||||
try:
|
try:
|
||||||
wait = 5
|
wait = 1
|
||||||
updated = False
|
updated = False
|
||||||
if self.schedule:
|
if self.schedule:
|
||||||
wait = self.schedule[0].next - time.time()
|
wait = self.schedule[0].next - time.time()
|
||||||
|
|
|
@ -79,6 +79,9 @@ class ElementBase(tostring.ToString):
|
||||||
self.idx = 0
|
self.idx = 0
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def __bool__(self):
|
||||||
|
return True
|
||||||
|
|
||||||
def __next__(self):
|
def __next__(self):
|
||||||
self.idx += 1
|
self.idx += 1
|
||||||
if self.idx > len(self.iterables):
|
if self.idx > len(self.iterables):
|
||||||
|
|
Loading…
Reference in a new issue