Noah Levitt
e5b2e2c327
Merge pull request #8 from internetarchive/adds-cron-garbage-collector
...
Adds cron garbage collector
2017-10-03 16:36:38 -07:00
James Kafader
e1b4153712
clean up small items, typos, change command name, clean up tests in re: exit code testing.
2017-10-03 16:13:42 -07:00
James Kafader
df7c0b8e32
added tests for purging stale services and minimal tests for command line tool
2017-10-03 14:38:31 -07:00
James Kafader
dd5b2122cf
improve the git diff here so this runs
2017-10-03 13:56:52 -07:00
James Kafader
a57b4484d3
initial (failing) version of tests file for CLI, changes to CLI to get it minimally working
2017-10-03 13:56:32 -07:00
James Kafader
8f5232ac73
a few more revisions after consultation with noah.
2017-09-26 17:00:17 -07:00
James Kafader
872ef2d93b
changed after reviewing merge request
2017-09-26 16:43:37 -07:00
James Kafader
a877fa0fd8
Adds cron garbage collector
2017-09-26 15:51:11 -07:00
Noah Levitt
03e641549e
use new index "role" in service registry
2017-09-06 17:25:35 -07:00
Noah Levitt
43cbcdf644
try again travis-ci
2017-06-27 11:15:41 -07:00
Noah Levitt
7cf33a81ea
retry in case of another type of recoverable error from a rethinkdb operation
2017-06-27 10:58:30 -07:00
Noah Levitt
b063fdc1fb
fix the KeyError bug in unique_service()
2017-05-26 14:52:36 -07:00
Noah Levitt
492c97ad31
have test expose bug in unique_service()
2017-05-26 14:48:18 -07:00
Noah Levitt
9194085d0c
a note about connection pooling
2017-05-22 14:28:22 -07:00
Noah Levitt
def44503bf
bump version after merging pr #5
2017-05-17 12:29:55 -07:00
Noah Levitt
3dbd3f8ae1
Merge pull request #5 from internetarchive/rename-heartbeat-interval-to-ttl
...
rename "heartbeat_interval" -> "ttl", simplify mathematics.
2017-05-17 12:29:07 -07:00
Noah Levitt
d33695e40b
tweak some docs
2017-05-17 12:28:48 -07:00
Noah Levitt
03e9d4eeef
Merge branch 'master' into rename-heartbeat-interval-to-ttl
...
* master:
bump version for pull request just merged and tweak run-tests.sh
avoid database transaction to get current time
make sure this variable is actually defined
correct comment
standardize the concept of 'now' to ensure that the same view of the service is returned from the read and update queries.
2017-05-17 12:15:44 -07:00
Noah Levitt
20857c4e7a
bump version for pull request just merged and tweak run-tests.sh
2017-05-17 12:13:10 -07:00
Noah Levitt
9b8b708c8c
Merge pull request #4 from internetarchive/fixes-no-unique-service-after-nomination
...
Fixes no unique service after nomination
2017-05-17 12:11:59 -07:00
Noah Levitt
158923d88b
avoid database transaction to get current time
2017-05-17 12:11:26 -07:00
James Kafader
a0d17151fe
make sure this variable is actually defined
2017-05-16 18:16:54 -07:00
James Kafader
e1b9451a6c
forgot to multiply the constants by 3
2017-05-16 18:02:03 -07:00
James Kafader
6dc3967bd6
rename "heartbeat_interval" -> "ttl", simplify mathematics.
2017-05-16 14:31:39 -07:00
James Kafader
55331083b3
correct comment
2017-05-16 11:33:15 -07:00
James Kafader
5fbedb0443
Merge branch 'master' into fixes-no-unique-service-after-nomination
2017-05-16 11:31:54 -07:00
James Kafader
78c26186b0
standardize the concept of 'now' to ensure that the same view of the service is returned from the read and update queries.
2017-05-16 11:31:03 -07:00
Noah Levitt
28b8c2eaac
remove accidentally added file __init__.pyc and allow travis-ci failures on non-stable versions of python
2017-05-01 19:56:52 -07:00
Noah Levitt
406a617d01
generalize regex to handle another exception message "Cannot perform read: The primary replica isn't connected to a quorum of replicas. ..."
2017-05-01 15:29:27 -07:00
Noah Levitt
6c57b81de8
recover from a transient error, which happens for me at least rethinkdb starts up
2017-05-01 14:01:01 -07:00
James Kafader
501ec1ff23
Adds more unique service tests
2017-05-01 13:35:09 -07:00
jkafader
2815983e40
Merge pull request #3 from internetarchive/unique-service
...
rename ServiceRegistry.leader() to ServiceRegistry.unique_service(); … 👍
2017-05-01 12:35:43 -07:00
Noah Levitt
9c2e7a59e1
remove stray code from abandoned heartbeat technique in unique_service()
2017-05-01 12:04:26 -07:00
Noah Levitt
b85566c405
rename ServiceRegistry.leader() to ServiceRegistry.unique_service(); implement heartbeat in that method; only return healthy service; add a detailed docstring
2017-04-28 16:29:00 -07:00
Noah Levitt
dcccc3fa23
lots of documentation on the service registry
2017-04-28 15:23:55 -07:00
Noah Levitt
a1c5a08790
raise exception if heartbeat status_info is missing required fields
2017-04-27 14:34:07 -07:00
Noah Levitt
c5da679b1d
bump version number for pull request #2 , and fiddle with .travis.yml
2017-04-18 17:13:54 -07:00
Noah Levitt
efc999f7d1
Merge pull request #2 from jkafader/master
...
added a leader election feature and tests
2017-04-18 17:04:36 -07:00
James Kafader
a5cac606fa
added a leader election feature and tests
2017-04-18 16:56:53 -07:00
Noah Levitt
2f01252c32
change logic of orm constructor so that initial values are not considered updates, and explain a bit in the docstring
2017-03-23 18:19:13 -07:00
Noah Levitt
7b17ed1057
turns out we want populate_defaults to happen in __init__, fix so things work right
2017-03-07 17:46:48 -08:00
Noah Levitt
3fd2e5cf60
new method on orm class populate_defaults(), which runs at the beginning of save(), since populating them in __init__() is problematic
2017-03-07 12:44:52 -08:00
Noah Levitt
07bc01cbbd
have Document.load() return None if no such doc is found in the db
2017-03-02 10:31:29 -08:00
Noah Levitt
aa177f94b8
split tests into different source files
2017-03-02 10:16:41 -08:00
Noah Levitt
93cdf59dec
update travis-ci badge url
2017-03-01 17:37:13 -08:00
Noah Levitt
246dfb5b7e
new orm class method table_ensure
2017-03-01 11:40:12 -08:00
Noah Levitt
c14bae6050
new convention, call Rethinker object rr
(mnemonic RethinkeR, or *double*[think]), leave rethinkdb as r
per the rethinkdb convention
2017-03-01 11:20:27 -08:00
Noah Levitt
536bf8d1d8
implement or explicitly disallow other top-level dict operations on ORM Document, and add more automated tests
2017-02-28 17:56:44 -08:00
Noah Levitt
e8db41763b
rename the project "doublethink" (credit goes to @adam-miller)
2017-02-28 16:44:26 -08:00
Noah Levitt
4a9978fc46
make ORM __getattr___ return None if attribute is missing; documentation improvements
2017-02-28 16:42:57 -08:00