From 5fa357e40331e29031346fa6b103f153fd9d9f14 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 17 Jan 2016 14:22:28 -0800 Subject: [PATCH] Disable linearize until it's reimplemented on sessions. --- channels/decorators.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/channels/decorators.py b/channels/decorators.py index 7be50ee..295ab3d 100644 --- a/channels/decorators.py +++ b/channels/decorators.py @@ -14,23 +14,22 @@ def linearize(func): up before the first has exited and saved its session. Doesn't guarantee ordering, just linearity. """ + raise NotImplementedError("Not yet reimplemented") @functools.wraps(func) def inner(message, *args, **kwargs): # Make sure there's a reply channel if not message.reply_channel: raise ValueError( - "No reply_channel sent to consumer; @no_overlap can only be used on messages containing it." + "No reply_channel in message; @linearize can only be used on messages containing it." ) - - # Get the lock, or re-queue - locked = message.channel_backend.lock_channel(message.reply_channel) - if not locked: - raise message.Requeue() + # TODO: Get lock here + pass # OK, keep going try: return func(message, *args, **kwargs) finally: - message.channel_backend.unlock_channel(message.reply_channel) + # TODO: Release lock here + pass return inner @@ -47,7 +46,8 @@ def channel_session(func): # Make sure there's a reply_channel if not message.reply_channel: raise ValueError( - "No reply_channel sent to consumer; @no_overlap can only be used on messages containing it." + "No reply_channel sent to consumer; @channel_session " + + "can only be used on messages containing it." ) # Make sure there's NOT a channel_session already