aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2014-12-09 11:36:35 -0800
committerRyan Huber <rhuber@gmail.com>2014-12-09 11:36:35 -0800
commit233558ebd7eb5e23ce6794ed67b6213e5fa4d822 (patch)
tree3f6b8b44482032bd4710e069583a8e96e22b19fa /wee_slack.py
parent8c67b813eada774a06e41eac6f195a5a956641ad (diff)
downloadwee-slack-233558ebd7eb5e23ce6794ed67b6213e5fa4d822.tar.gz
move where queue is released. fixed?!
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 320ec23..9382b13 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1053,17 +1053,17 @@ def url_processor_cb(data, command, return_code, out, err):
big_data[identifier] = ''
big_data[identifier] += out
if return_code == 0:
- async_queue_lock = False
try:
my_json = json.loads(big_data[identifier])
+ async_queue_lock = False
except:
# if big_data[identifier] != '':
- async_queue_lock = False
dbg("curl failed, doing again...")
dbg("curl length: {} identifier {}\n{}".format(len(big_data[identifier]), identifier, data))
async_slack_api_request(*data, priority=True)
pass
my_json = False
+ async_queue_lock = False
del big_data[identifier]
if my_json:
@@ -1216,7 +1216,7 @@ if __name__ == "__main__":
w.hook_config("plugins.var.python." + SCRIPT_NAME + ".*", "config_changed_cb", "")
- w.hook_timer(1000, 0, 0, "async_queue_cb", "")
+ w.hook_timer(10, 0, 0, "async_queue_cb", "")
w.hook_timer(6000, 0, 0, "slack_connection_persistence_cb", "")
### attach to the weechat hooks we need