173121ca87
Switch URL to one that should definitely not resolve
2013-03-30 17:31:35 -04:00
26bab031bd
Add StreamInserter.send() to trigger intermediate block send
2013-03-30 17:30:43 -04:00
b5fefffa09
Use a global cached server object for WSGI app
...
This is instead of caching it inside nilmdb.server.wsgi_application.
Might make things work a bit better in case the web server decides
to call wsgi_application multiple times.
2013-03-30 15:56:57 -04:00
dccb3e370a
WSGI config needs to specify application group
...
This ensures that the same Python sub-instance handles the request,
even if it's coming in from two different virtual hosts.
2013-03-30 15:56:02 -04:00
95ca55aa7e
Print out WSGI environment on DB init failure
2013-03-30 15:55:41 -04:00
e01813f29d
Fix wsgi documentation
2013-03-25 13:52:32 -04:00
7f41e117a2
Fix tabs
2013-03-25 13:44:03 -04:00
dd5fc806e5
Restructure WSGI app to regenerate error on each call, if needed
...
This way, errors like "database already locked" can be fixed and the
page reloaded, without needing to restart Apache.
2013-03-24 21:52:11 -04:00
f8ca8d31e6
Remove Iteratorizer, as it's no longer needed
2013-03-24 21:31:03 -04:00
ed89d803f0
Remove aplotter code
2013-03-24 21:29:09 -04:00
3d24092cd2
Replace bare 'except:' with 'except: Exception'
...
Otherwise we might inadvertently catch SystemExit or KeyboardExit or
something we don't want to catch.
2013-03-24 21:28:01 -04:00
304bb43d85
Move lockfile out of data dir, to avoid stream tree conflicts
2013-03-24 21:23:45 -04:00
59a79a30a5
Remove lockfile when done.
...
This isn't necessary for correct behavior: if the database is killed,
the old flock() will go away when the file descriptor gets closed.
2013-03-24 21:20:47 -04:00
c0d450d39e
Add locking mechanism to avoid multiple servers on one DB
2013-03-24 21:20:20 -04:00
6f14d609b2
Fix issue where bulkdata was accidentally closed
2013-03-24 21:16:18 -04:00
77ef87456f
Improve WSGI application support, fix docs
2013-03-24 21:16:03 -04:00
32d6af935c
Improve wsgi docs
2013-03-22 19:17:36 -04:00
6af3a6fc41
Add WSGI application support and documentation
2013-03-22 19:14:34 -04:00
f8a06fb3b7
Clarify default DB path in nilmdb_server.py help text
2013-03-22 15:09:37 -04:00
e790bb9e8a
Fix test failure when tests are run as root
2013-03-21 14:33:02 -04:00
89be6f5931
Add option to include interval start/end markup on extract
...
When enabled, lines like "# interval-start 1234567890123456" and "#
interval-end 1234567890123456" will be added to the data output. Note
that there may be an "interval-end" timestamp followed by an identical
"interval-start" timestamp, if the response at the nilmdb level was
split up into multiple chunks.
In general, assume contiguous data if previous_interval_end ==
new_interval_start.
2013-03-19 14:23:33 -04:00
4cdef3285d
Destroy now requires that all data has been previously removed.
...
Added new flag "-R" to command line to perform an automatic removal.
This should be the last of the ways in which a single command could
block the nilmdb thread for a long time.
2013-03-18 19:39:03 -04:00
bcd82c4d59
Limit the number of rows removed per call to nilmdb.stream_remove
...
Server class will retry as needed, as with stream_extract and
stream_intervals.
2013-03-18 18:22:45 -04:00
caf63ab01f
Fix stream_extract/stream_intervals restart around timestamp == 0.
2013-03-18 18:20:25 -04:00
2d72891162
Accept "min" and "max" as timestamps on command line
2013-03-18 18:19:24 -04:00
cda2ac3e77
Don't return a mutable interval from IntervalSet.intersection()
...
Instead, always take the subset, which creates a new interval.
Also adds a small optimization by moving the 'if orig' check outside the
loop.
2013-03-18 18:16:35 -04:00
57d3d60f6a
Fix relative import problems
2013-03-18 16:27:27 -04:00
d6b5befe76
Don't use filenames as default arg completion
2013-03-16 17:27:58 -04:00
7429c1788d
Update nilmdb.utils.time
2013-03-15 22:49:59 -04:00
0ef71c193b
Remove layout.pyx, since rocket replaced it
2013-03-15 22:32:40 -04:00
4a50dd015e
Merge branch 'python-intervals'
2013-03-15 21:39:11 -04:00
22274550ab
Test python version of Interval too
2013-03-15 21:37:03 -04:00
4f06d6ae68
Move Interval set_difference inside nilmdb.utils for clients
...
Clients might need to to Interval math too, so move a simple Interval
class and start putting helpers in there.
2013-03-15 21:37:03 -04:00
c54d8041c3
Update design docs
2013-03-15 21:07:01 -04:00
52ae397d7d
Bump database version to 3, reject old version 2 due to timestamp changes
2013-03-15 18:37:38 -04:00
d05b6f6348
Merge branch 'rocket-cleanup'
2013-03-15 18:08:36 -04:00
049375d30e
Fill out test coverage
2013-03-15 18:08:21 -04:00
88eb0123f5
Add test for Table.__getitem__ indexing
2013-03-15 18:08:21 -04:00
a547ddbbba
Change table.get_timestamp to table.__getitem__
...
This lets us use simple indexing to get timestamps from the table,
which allows us to use 'bisect' directly without needing a proxy class.
2013-03-15 18:08:21 -04:00
28e72fd53e
Remove Table.__getitem__; used only by tests
2013-03-15 18:08:21 -04:00
f63107b334
Add rocket.extract_timestamp to speed up bisections
2013-03-15 18:08:21 -04:00
955d7aa871
Remove floating port time support from nilmdb.utils.time
2013-03-15 18:08:21 -04:00
b8d2cf1b78
Consolidate rocket._extract_handle.params with extract_string
2013-03-15 18:08:21 -04:00
7c465730de
Remove rocket.extract_pyobject
2013-03-15 18:08:21 -04:00
aca130272d
Remove rocket.extract_list
2013-03-15 18:08:21 -04:00
76e5e9883f
Remove Table.append, rocket.append_iter
2013-03-15 18:08:20 -04:00
fb4f4519ff
Clean up and simplify Table.get_*, including __getitem__
2013-03-15 18:08:20 -04:00
30328714a7
Remove python implementation of rocket
2013-03-15 18:08:20 -04:00
759466de4a
Merge branch 'timestamp-integers'
2013-03-15 18:07:51 -04:00
d3efb829b5
Try to parse timestamps as double, if int64 parse fails
2013-03-15 15:19:41 -04:00