| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Fix the zookeeper backend options when values are passed as strings,
a "False" string is now treated as the False boolean.
Closes-Bug: #1999174
Change-Id: I048faf06d89ebf980efe0598e647f2ec89f65ada
|
| |/
|
|
|
|
|
|
|
| |
Replace abc.abstractproperty with property and abc.abstractmethod,
as abc.abstractproperty has been deprecated since python3.3[1]
[1]https://docs.python.org/3.8/whatsnew/3.3.html?highlight=deprecated#abc
Change-Id: I1bcecd99d8856c26621a5304d9f7f01f8f111918
|
| |
|
|
|
|
|
|
| |
This library no longer supports Python 2, thus usage of six can be
removed. This also removes workaround about pickle library used in
Python 2 only.
Change-Id: I19d298cf0f402d65f0b142dea0bf35cf992332a9
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When catching that a redis buffer is not formatted correctly,
_fetch_jobs now deletes the data from the hashmap, so the same error
will not occur during the next call to the function.
The commit also adds JobFailure in the list of caught exceptions (might
be raised by _loads) in _fetch_jobs
Closes-Bug: #1949950
Change-Id: I9078086cd4c3dbfa954422dfa3d5b19fefd7264f
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Redis client has an ability to connect to Redis server
using Sentinel[1] (especially important for Redis clusters),
but this ability was missing here.
Allow to pass 'sentinel' variable to Redis conf, extend
_make_client to use sentinel for that case.
[1] - https://github.com/andymccurdy/redis-py#sentinel-support
Change-Id: Ia8cc98e701435fd0231da3724f5d7108fc4f96f4
|
| |
|
|
|
|
| |
Avoid redirects, s/http/https/.
Change-Id: Id03bd49f250b48109967a0e04b92b75925f08932
|
| |
|
|
|
|
| |
Related-Bug: #1557107
Change-Id: I8b2f327dadbf038cd050f05fbc46a428282a3d82
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
python3.0 has deprecated LOG.warn
https://docs.python.org/3/library/logging.html#logging.warning
Closes-Bug: #1650843
Change-Id: Ib8473cbdb84547f385e619fe08ed723b1ee7bcdb
|
| |
|
|
|
|
|
|
|
|
| |
Some classes defines __eq__() built-in function, but does
not define __ne__() built-in function, so self.assertEqual works
but self.assertNotEqual does not work at all in this test case in
python2. This patch fixes it.
Change-Id: I3e4f213081268bad44583a63a84795d39094117f
Closes-Bug: #1586268
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the underlying connection is in LOST or SUSPENDED mode do not
allow jobs to be iterated over (and clear the local cache when the
connection has been LOST).
Related-Bug: #1557107
Change-Id: Ic0a2ab2519ff8a7386d80d9092a0e24579883681
|
| |/
|
|
| |
Change-Id: I7e3451feb94b1f25b00c5e7b197bb6b527548306
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow for providing job priority on job posting and order
iteration by priority (this does not store in any special way
different priorities under different keys/paths, but it could be
done that way in the future).
This is backwards compat in that all old jobs posted without a
priority assume a normal/default priority.
Change-Id: Ie670023d624f4442a16a1278a3aee0d88b102842
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| | |
Change-Id: If45e46c35a17f9fd347c7a09ec7b7588c7a266e2
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It is quite useful for someone who has posted a job to be able to
easily wait for its completion (up to a given timeout) so add a wait
method onto the job class to allow for this to be possible.
Change-Id: Id3a7c724020962591e323da0febfd0c71d1acc50
|
| | |/
|/|
| |
| | |
Change-Id: I43465b8f5868e64bdf38d2873417a8a4a403a23b
|
| |/
|
|
| |
Change-Id: I8c0abef6924f16c8b017193451e1ee273ad1d754
|
| |
|
|
|
|
|
|
|
| |
Now that the conductor base class provides a constant that
all entity objects produced from it should provide we can
now use that to ensure we are only registering a limited set
of entity kinds.
Change-Id: I0e71a8da64a228fdc68c9de941aaccf54d493d96
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a executor backed job dispatching base class
and has the existing blocking executor use it by running jobs
and dispatching jobs into a sync executor. It also allows
for dispatching jobs into a thread executor, or other executor
via a new '_executor_factory' method that can generate
executors (it can be overriden in the non-blocking executor
to provide your own executors instances).
This does alter the behavior in that now that jobs are dispatched
into an executor we no longer can immediatly know if a job was
dispatched and raised an exception or whether it will raise an
exception in the future, so we now alter the 'local_dispatched'
to just be a boolean that is used to determine if any dispatches
happened (failure or not).
Change-Id: I485770e8f4c85d3833892a453c9fb5168d8f0407
|
| |
|
|
| |
Change-Id: I3bf935280a6e8b265045b09fde43d0ec7dc56f07
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows jobs to be fully be comparable using the total
ordering function to provide the complexity around the various
functions needed to achieve/perform comparisons.
Also fixes up the various job __eq__ and __lt__ methods to
correctly return 'NotImplemented' on unknown types and adds
a __hash__ to the redis job (so that it can be used in hashable
collections, just like the zookeeper job class).
Change-Id: I8820d5cc6b2e7f346ac329f011f41b76fa94b777
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To make the zookeeper jobboard and redis jobboard iterjobs and wait
functions that much similar have both return iterator objects from
the same class iterator.
This makes the iterator code and the jobboard code that much easier
to follow and understand.
Change-Id: Ia772cde881c2631002140e06684521fd42441534
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
Since the creation of a client is somewhat important
and knowing what the options that are transfereed to kazoo
are we should explicitly document what keys are and what
the values should be.
Change-Id: I1a5037b274828190270ea5c402be8b2100306de4
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This allows those who were using it to still continue using it
until 2.0 where it will be removed; this makes it possible for
those users to get off that code in a way that will be easily
do-able (without totally breaking there code-bases, until we do
that in the 2.0 release).
This also removes all internal usage of that stop watch class
so that the library itself will not reference it anymore.
Change-Id: If313d8e7b9bdc8741db2e2e1dfb381aa3260b971
|
| |\ \ \
| |/ / |
|
| | |/
| |
| |
| | |
Change-Id: If89baa042695f19e42b6368034f3ccf22c2cf0aa
|
| |/
|
|
|
|
|
|
| |
The information about the sequence and the owner_key is
useful for debugging and for interacting with redis if
the owner key ever needs to be manually removed.
Change-Id: Ibe751d15938a2bcb83fb057f4c139f8f0022a60b
|
| |
|
|
|
|
| |
Part of blueprint taskflow-redis-jobs
Change-Id: I7c94e2201c5d933c8a1ec73fc0cf705962e5eef6
|
| |
|
|
|
|
| |
Depends-On: I442249783da4a6ae10c78b95e0b279409c95d2e6
Change-Id: I877928c858e8d6176d3f01ad9de2765104acf5c3
|
| |
|
|
|
|
|
|
| |
These usages are not really needed and can just be
eliminated since they offer no benefit (and coverage
may classify them as dead/useless code).
Change-Id: I951c4cb9216a19ce37dc8fc390ae905fd525a3c7
|
| |
|
|
|
|
|
|
|
|
|
| |
This should be done (and are done, but not with the best
exception messages) in a more appropriate place (in the
methods of the jobboard that mutate a job via some manner,
aka, in consume, claim, abandon, trash...).
Part of fix for bug 1452388
Change-Id: If29bc73cc6e9282ad35a50ce0041efc3ff8f71d9
|
| |
|
|
|
|
|
|
| |
Have the default path used be a class level constant (that
is picked up by sphinx) and tweak the docstring to be formatted
better and to read better (with less grammatical issues).
Change-Id: I43b78a2b36ed92dbd6dfb4d7376535ad361dc03d
|
| |
|
|
|
|
|
|
| |
Also fixes up some inline-code/examples docs to
correctly display in the generated docs (and
tweaks some URI capitalization).
Change-Id: I001ef2460eb5e9a884ca6db6e8d6f72864191fe7
|
| |\ |
|
| | |
| |
| |
| | |
Change-Id: I47e7a14a93026918f4a469139ca6a53dbaa1f702
|
| | |
| |
| |
| |
| |
| |
| |
| | |
To make it easy to document and inquire on the zookeeper
job constants expose them as class level instead of module
level constants (and use them where needed).
Change-Id: Ice53db104c55ba4a7794a358d56922074d44492b
|
| |/
|
|
| |
Change-Id: I5a35194022656786c329ea3586366d3b00b461ba
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Also adds basic unit tests to test that the states module
functions have some level of testing to ensure they don't
break.
Change-Id: Icedd6e70820bcf484c0dace76f2acf01d9bc967e
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the zookeeper jobboard (and persistence backends) we
are associating the cause of a new exception when raising a
exception. Using the new exception helper we can make this
work better on py2.x and py3.x so that the py3.x version
has the chain setup correctly (while the py2.x version just
uses the class 'cause' attribute instead).
Change-Id: Ieeac2f70e1834d4612556565762ffd3be3e5b5a1
|