diff options
author | Lance Stout <lancestout@gmail.com> | 2011-08-25 13:34:30 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2011-08-25 13:34:30 -0700 |
commit | 4c08c9c52495a3e3e5b794fa346724abfb206c43 (patch) | |
tree | 2efcf5b106b5eb50e6a4da28c37814e67a0fbf62 /sleekxmpp/xmlstream/xmlstream.py | |
parent | 63b8444abe94eb2a4bc3922510a89ef0a30a0008 (diff) | |
download | slixmpp-4c08c9c52495a3e3e5b794fa346724abfb206c43.tar.gz slixmpp-4c08c9c52495a3e3e5b794fa346724abfb206c43.tar.bz2 slixmpp-4c08c9c52495a3e3e5b794fa346724abfb206c43.tar.xz slixmpp-4c08c9c52495a3e3e5b794fa346724abfb206c43.zip |
Update scheduler with locks and ability to remove tasks.
Scheduled tasks must have a unique name.
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r-- | sleekxmpp/xmlstream/xmlstream.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 3eb263ae..405f76d3 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -215,7 +215,7 @@ class XMLStream(object): self.event_queue = queue.Queue() self.send_queue = queue.Queue() self.__failed_send_stanza = None - self.scheduler = Scheduler(self.event_queue, self.stop) + self.scheduler = Scheduler(self.stop) self.namespace_map = {StanzaBase.xml_ns: 'xml'} @@ -1178,8 +1178,9 @@ class XMLStream(object): log.exception(error_msg % handler.name) orig.exception(e) elif etype == 'schedule': + name = args[1] try: - log.debug('Scheduled event: %s' % args) + log.debug('Scheduled event: %s: %s' % (name, args[0])) handler(*args[0]) except Exception as e: log.exception('Error processing scheduled task') |