Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Docs: Remove dirty stats items
Fixes #4216.
  • Loading branch information
unho committed Dec 2, 2015
1 parent 4c583d1 commit 243a7c6
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/server/rq.rst
Expand Up @@ -142,3 +142,32 @@ that all else is good and that the stats are fine or to be generated again.
.. code-block:: bash
$ redis-cli -n 2 del pootle:refresh:stats
Delete dirty counts
+++++++++++++++++++

Sometimes statistics are correctly calculated, but the banner telling that
stats are being refreshed doesn't dissappear. This usually happens because some
job failed to complete and thus it didn't decrease the dirty counts.

Make sure that there are no pending jobs or jobs being run since those could
have increased the dirty counts. Re-run failed jobs if any.

In order to delete all the dirty counts you must **stop the workers**.

Remove the ``lastjob`` info for all dirty items:

.. code-block:: bash
$ redis-cli -n 2 ZRANGEBYSCORE "pootle:dirty:treeitems" 1 10000 | perl -nE 'chomp; s/\/$//; s/^\///; s/\//./g; `redis-cli -n 2 DEL pootle:stats:lastjob:$_`'
Now remove the dirty items:

.. code-block:: bash
$ redis-cli -n 2 ZRANGEBYSCORE "pootle:dirty:treeitems" 1 10000 | perl -nE 'chomp; `redis-cli -n 2 ZREM pootle:dirty:treeitems $_`'
Do not forget to **restart the workers**.

0 comments on commit 243a7c6

Please sign in to comment.