Jim Paris
cc211542f8
Add binary support to nilmdb.server; enforce content-type
10 years ago
Jim Paris
8292dcf70b
Clean up stream/extract content-type and add a test for it
10 years ago
Jim Paris
b362fd37f6
Add binary option to nilmdb.stream_insert
10 years ago
Jim Paris
41ec13ee17
Rename bulkdata.append_string to bulkdata.append_data
10 years ago
Jim Paris
efa9aa9097
Add binary option to bulkdata.append_string
10 years ago
Jim Paris
d9afb48f45
Make append_binary signature look like append_string
10 years ago
Jim Paris
d1140e0f16
Timestamps are int64, not uint64
10 years ago
Jim Paris
6091e44561
Fix fread return value check
10 years ago
Jim Paris
e233ba790f
Add append_binary to rocket
10 years ago
Jim Paris
f0304b4c00
Merge branch 'binary' into HEAD
10 years ago
Jim Paris
60594ca58e
Numpy is required for tests now, due to nilmdb.client.numpyclient
Still allow installation without it, though.
10 years ago
Jim Paris
c7f2df4abc
Add nilmdb.client.numpyclient.NumpyClient with stream_extract_numpy
This is a subclass of nilmdb.client.client.Client that adds numpy
specific routines, which should be a lot faster.
10 years ago
Jim Paris
5b7409f802
Add binary extract to client, server, nilmdb, bulkdata, and rocket.
10 years ago
Jim Paris
06038062a2
Fix error in time parsing
10 years ago
Jim Paris
ae9fe89759
Parse timestamps with '@' before any other checks
10 years ago
Jim Paris
04def60021
Include stream path in "no such stream" errors
10 years ago
Jim Paris
9ce0f69dff
Add "--delete" option to "nilmtool metadata" tool
This is the same as "--update" with an empty string as the value.
10 years ago
Jim Paris
90c3be91c4
Natural sort for streams in client.stream_list
10 years ago
Jim Paris
ebccfb3531
Fix stream renaming when the new path is a parent of the old
10 years ago
Jim Paris
e006f1d02e
Change default URL to http://localhost/nilmdb/
10 years ago
Jim Paris
5292319802
server: consolidate time processing and checks
10 years ago
Jim Paris
173121ca87
Switch URL to one that should definitely not resolve
10 years ago
Jim Paris
26bab031bd
Add StreamInserter.send() to trigger intermediate block send
10 years ago
Jim Paris
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.
10 years ago
Jim Paris
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.
10 years ago
Jim Paris
95ca55aa7e
Print out WSGI environment on DB init failure
10 years ago
Jim Paris
e01813f29d
Fix wsgi documentation
10 years ago
Jim Paris
7f41e117a2
Fix tabs
10 years ago
Jim Paris
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.
10 years ago
Jim Paris
f8ca8d31e6
Remove Iteratorizer, as it's no longer needed
10 years ago
Jim Paris
ed89d803f0
Remove aplotter code
10 years ago
Jim Paris
3d24092cd2
Replace bare 'except:' with 'except: Exception'
Otherwise we might inadvertently catch SystemExit or KeyboardExit or
something we don't want to catch.
10 years ago
Jim Paris
304bb43d85
Move lockfile out of data dir, to avoid stream tree conflicts
10 years ago
Jim Paris
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.
10 years ago
Jim Paris
c0d450d39e
Add locking mechanism to avoid multiple servers on one DB
10 years ago
Jim Paris
6f14d609b2
Fix issue where bulkdata was accidentally closed
10 years ago
Jim Paris
77ef87456f
Improve WSGI application support, fix docs
10 years ago
Jim Paris
32d6af935c
Improve wsgi docs
10 years ago
Jim Paris
6af3a6fc41
Add WSGI application support and documentation
10 years ago
Jim Paris
f8a06fb3b7
Clarify default DB path in nilmdb_server.py help text
10 years ago
Jim Paris
e790bb9e8a
Fix test failure when tests are run as root
10 years ago
Jim Paris
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.
10 years ago
Jim Paris
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.
10 years ago
Jim Paris
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.
10 years ago
Jim Paris
caf63ab01f
Fix stream_extract/stream_intervals restart around timestamp == 0.
10 years ago
Jim Paris
2d72891162
Accept "min" and "max" as timestamps on command line
10 years ago
Jim Paris
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.
10 years ago
Jim Paris
57d3d60f6a
Fix relative import problems
10 years ago
Jim Paris
d6b5befe76
Don't use filenames as default arg completion
10 years ago
Jim Paris
7429c1788d
Update nilmdb.utils.time
10 years ago