- Jul 2020
- Apr 2020
-
github.com github.comrq/rq1
-
def handle_exception(self, job, *exc_info):
To unit test an exception handler:
worker = Worker(..., exception_handler=[handle_exception]) try: raise Exception() except Exception: exc_info = sys.exc_info() worker.handle_exception(job, *exc_info)
-
-
python-rq.org python-rq.orgRQ: Jobs3
-
failure_ttl
How long to keep a failed job.
-
result_ttl=600
How long to keep a successful job.
-
job.meta['handled_by'] = socket.gethostname() job.save_meta()
You can add metadata on the job like keeping track of the number of times a job has been retried for example.
Tags
Annotators
URL
-
-
python-rq.org python-rq.org
-
w = Worker([q], exception_handlers=[foo_handler, bar_handler])
Exception handlers are attached to the worker.
-
def my_handler(job, exc_type, exc_value, traceback): # do custom things here
Write an exception handler that requeues a failed job.
Tags
Annotators
URL
-
- Jan 2020
-
blog.cspub.net blog.cspub.net
-
But the reason is that, if your host system does not have the vm.overcommit_memory=1 enabled, you will not be able to switch it inside container.
Fixed redis issue on harbor: "Can't save in background: fork: Cannot allocate memory"
Added on /root/harbor/docker-compose.yml:
command: sh -c 'echo 1 > /proc/sys/vm/overcommit_memory'
Also executed command: sh -c 'echo 1 > /proc/sys/vm/overcommit_memory' on the main server harbor (not only on the container)
Tags
Annotators
URL
-
- Aug 2019
- Nov 2018
- Dec 2017
-
stackoverflow.com stackoverflow.com
- Jul 2017
-
openresty.org openresty.org
-
since
lua-resty-redis
can not be used inset_by_lua*
, dynamic routing based on redis should be impelemented in theaccess_by_lua
block
-
- Oct 2014
-
-
This in turn means that Redis Cluster does not have to take meta data in the data structures in order to attempt a value merge, and that the fancy commands and data structures supported by Redis are also supported by Redis Cluster. So no additional memory overhead, no API limits, no limits in the amount of elements a value can contain, but less safety during partitions.
A solid trade-off, I think, and says a lot about the intended use cases.
Tags
Annotators
URL
-