In dev, only show the message "Tornado X% busy over the past Y seconds"
if we've been more than 20% busy.
(imported from commit 2775e6151ccf03ba0cb2a1f96e4f4839774a870f)
I'd like to minimize the probability that we'll actually run the code
in the "messages not rendered yet in database" codepath since it might
perform poorly, and it seems like the best way to do that is to just
run a loop that renders them all.
(imported from commit 247cb85fffa6cbc95958b9feda97462792a542c2)
Mark messages as read when with the pointer, but mark all messages
read if the last message is visible.
(imported from commit 4c1a928bd6966111f0f34c5207723656b5f193b9)
In the future, this could come from the server to enable individual
experiments on a per-realm basis.
(imported from commit 8fd1ba1910b3cfd131f58bab8efbd11a42053bc3)
The close() method will let you release handlers, as well as
doing everything clear() does.
(imported from commit 3a67c3f2226918cee10cf43598e0408fb186408a)
The set_up_file_input() function now returns an object to the user
with a clear field. This object will grow soon.
(imported from commit 7b3761eafddb392bd2c84a1685aa8d1811028a0f)
This is a temporary expedient measure to work around our
PATCH not supporting file uploads in our current Django setup.
(imported from commit c3146b23d5d7d134c2b80507eb87033ca375a4db)
E.g. if the Zulip realm, if you ever put "#15" in a Markdown link, you
surely don't want it to be auto-replaced with a Trac link.
(imported from commit 2e117a7bbbd9c82f8c0ba4d390472770f4425589)
This is a compromise between the old color when selected and when not
selected. It makes the border a little easier to see while still being
subtle.
(imported from commit 7177d8f688af3de15f3e309d6a9c7c248acb1db4)
Since we no longer change the selected message's background color, it
doesn't make sense for these other colors to still change when the
message is selected.
(imported from commit a7c387e7d390b7f2973dc6bd3168651d88880139)
Code prior to this commit was functionally working, but semantically
flawed — returning false does not short-circuit _.each like it does with
$.each. It now uses _.every, as suggested by Steve.
In addition I renamed the function to be more descriptive, added a
comment, and eliminated needless double negation.
(imported from commit b0666dfa01b2677b4eaf577fe9ced90ed0db2438)
They are synonyms, and Zukeeper consensus is that _.any makes it clearer
what the function does.
(imported from commit 847383e27ccefeaff1ecff15f4cb4177c9e40c25)
The previous regex didn't escape the period in '.d' and was doing a
case-sensitive match to find the base stream name.
(imported from commit 43ef13733987e50dcead06b7bd3e768cb4395998)
We now write the fact that a message was created or updated to a log
table and actually update the tsvector asynchronously from a worker
process.
This also means that when running locally, one now needs to run the
process_fts_updates script in order to have new messages indexed for
full text search.
(imported from commit ebb11b08d30be2a45242dafe146e8e861a0f050a)
Unlike the other workers, this process runs on the database server.
To prevent duplicate work, only the worker on the master actually
processes updates.
To deploy, we in theory just need to apply the new puppet config. In
practice, the database servers aren't on wheezy yet, so the changes
should be applied by hand to postgres0 and postgres1. This only
needs to be done on deploy to staging.
(imported from commit d679ffc0838f9fc8c7f0bede08a5568b339b7ddb)
Previously, when the first `which` failed, the entire script would
fail with exist status 1 because we pass `-e` to the interpreter.
(imported from commit 601de3b3e3edd90110fc478f7874e644009d1b62)
Previously, we would return a JSONDecodeError to the user in the event
that the server returned a 500 error (or other non-JSON content).
(imported from commit 1624dfec6ac65d34216f4de91e33116a54e414fa)
The documentation for the Python `random` module explains that it "is
completely unsuitable for cryptographic purposes." This new way of
generating API keys replaces use of the random module with
`os.urandom()`, which is intended to be suitable for such uses. As a
bonus, the code is simpler and clearer.
(imported from commit cc3697a5048f2da53f0fce6689167f9d1cbb6466)