taskflow/taskflow/tests/unit/jobs
Rick van de Loo 5f3c132523 do not allow redis job reclaim by same owner
Running a nonblocking conductor or two conductors on the same host will re-execute the same job multiple times with the current implementation of 'claim' for the redis jobboard backend. This is different from the ZooKeeper jobboard backend, there the same owner of a job is not allowed to reclaim the job again (https://github.com/openstack/taskflow/blob/master/taskflow/jobs/backends/impl_zookeeper.py#L554). If the same owner is allowed to reclaim the job again there can be no concurrent execution on the same owner because all jobs will be re-claimed and re-executed by the same owner every pass as long as it's on the jobboard.

To reproduce this behavior:

- Use the redis jobboard backend
- Create a flow with a task that sleeps 10 seconds in the execute method
- Post that flow as a job
- Run a nonblocking conductor

It will claim and execute the same job multiple times in a loop until the first worker is finished and consumes the job. After this change it will not re-execute the same job multiple times.

Change-Id: I4f6c364211500e510fc496f23b03ce056771417d
2017-05-13 16:55:50 +02:00
..
__init__.py Upgrade hacking version and fix some of the issues 2014-06-13 19:27:17 -07:00
base.py Add ability of job poster/job iterator to wait for jobs to complete 2015-12-16 08:19:24 -08:00
test_entrypoint.py Build-out + test a redis backed jobboard 2015-06-29 12:13:01 -07:00
test_redis_job.py do not allow redis job reclaim by same owner 2017-05-13 16:55:50 +02:00
test_zk_job.py Add rundimentary and/or non-optimized job priorities 2016-01-09 22:43:25 -08:00