diff options
author | Ben Sima <ben@bsima.me> | 2020-03-30 09:12:38 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-03-30 09:12:38 -0700 |
commit | ef3db8a4114aa0ef66ea5f9e15bbc83e1f36f33a (patch) | |
tree | b6e2526f0a9955bda29d5c0fdd7dd2167aefb8b3 /Run | |
parent | 9663e948dfce5a080bd35488e5ee339958ecf0e8 (diff) |
Don't read the body until I need it
Diffstat (limited to 'Run')
-rw-r--r-- | Run/Que.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -88,10 +88,10 @@ routes = do -- | Put a value on a que. Returns immediately. Scotty.post (Scotty.regex quepath) <| do (ns, qp) <- extract - qdata <- Scotty.body -- ensure namespace exists app . modify <| upsertNamespace ns - q <- app <| que ns qp + q <- app <| que ns qp + qdata <- Scotty.body liftIO <| pushQue (BSL.toStrict qdata) q return () |