Peter Bieringer
e05206eec3
Merge branch 'improved-broken-vcard-handling' of github.com:pbiering/Radicale into improved-broken-vcard-handling
2016-09-18 19:28:15 +02:00
Peter Bieringer
af5c1582dc
improved detection of broken vcards
2016-09-18 19:23:24 +02:00
Peter Bieringer
1ffdb03106
simplify patch
2016-09-17 18:16:27 +02:00
Peter Bieringer
ff02d17619
remove temporary debug statements
2016-09-17 17:44:33 +02:00
Peter Bieringer
1cfd3fd95b
filter broken vcard entries before delivered, found on real life system at least 2 cards where vobject claimed about
...
vobject.base.ValidateError: 'VCARD components must contain at least 1 N'
2016-09-17 16:53:24 +02:00
Peter Bieringer
18181374e1
log exception for broken items
2016-09-17 16:29:40 +02:00
Peter Bieringer
a57fcad270
catch 2nd case for broken object
2016-09-17 13:56:27 +02:00
Peter Bieringer
cd97aab72c
try/catch of objects avoiding not serving any object in case an object has no valid contents
...
also log duration of how many objects are read per folder
2016-09-17 12:52:42 +02:00
Guillaume Ayoub
0c1dbc30bd
Log read objects
2016-09-16 14:13:53 +02:00
Guillaume Ayoub
ecb8a99ed1
Merge branch 'master' of github.com:Kozea/radicale
2016-09-16 14:12:36 +02:00
Guillaume Ayoub
2c938ea67a
Don't log when skipping .Radicale* files
...
Patch proposed by @pbiering.
2016-09-16 14:12:05 +02:00
Unrud
def34b1454
Fix BaseCollection.move
...
The update method doesn't exist.
2016-09-15 11:18:55 +02:00
Guillaume Ayoub
9e78454da2
Merge branch 'remupdate' of https://github.com/Unrud/Radicale into Unrud-remupdate
2016-08-26 22:50:26 +02:00
Guillaume Ayoub
a3dcfaacd6
Merge pull request #491 from Unrud/uploadall
...
Optimize upload of whole collections
2016-08-26 22:34:46 +02:00
Unrud
c5342d36d5
Remove BaseCollection.update
...
I don't think that this can be used for optimizations.
It's useless in the filesystem backend, SQL has REPLACE and I doubt that there is much use in any other storage mechanism.
2016-08-25 06:37:12 +02:00
Unrud
ea63f461a8
Rename upload_all to upload_all_nonatomic
2016-08-25 06:03:13 +02:00
Unrud
30d287ce00
Write files nonatomic in upload_all
...
It's only used in temporary collections.
2016-08-25 06:03:13 +02:00
Unrud
e31ea57883
Use upload_all for addressbook
2016-08-25 06:03:13 +02:00
Unrud
bc0f8b0a47
Remove duplicate code
2016-08-25 06:03:13 +02:00
Unrud
c57307c585
Rename collections to vobject_items
...
Like the parameter name of upload_all
2016-08-25 05:52:26 +02:00
Unrud
6045ad97fe
Move upload_all from BaseCollection to Collection
...
This is not used anywhere outside of Collection and probably never will be as WebDAV doesn't support bulk uploads.
2016-08-25 05:47:31 +02:00
Unrud
10786cbad8
Move hook into storage.Collection
...
The hook is only valid for filesystem storage, it's meaningless for other backends like databases.
2016-08-25 05:40:46 +02:00
Florian Mounier
c95437367f
This is very important
2016-08-12 15:05:05 +02:00
Florian Mounier
416f9ddef1
Add an upload_all method for subsequent optimizations.
2016-08-12 14:58:32 +02:00
Guillaume Ayoub
e66a35e996
Merge pull request #476 from Unrud/closelockfile
...
Add option to close lock file
2016-08-11 11:43:40 +02:00
Guillaume Ayoub
f395e256ff
Merge pull request #478 from Unrud/patch-33
...
Correctly write line endings to files
2016-08-11 11:43:18 +02:00
Unrud
9e84b459ae
Correctly write line endings to files
...
vobject uses \r\n as line endings. Writing this to a file is not a problem on Linux and newer versions of MacOS. On Windows \r\r\n gets written to disk and on older versions of MacOS \r\r gets written to disk, because python replaces \n by the system depended line ending.
2016-08-11 05:43:18 +02:00
Unrud
3f5dd70580
Add option to close lock file
...
Close the lock file, when no more clients are waiting.
This option is not very useful in general, but on Windows files that are opened cannot be deleted. This causes tests to fail, because the deletion of the temporary filesystem folder fails.
2016-08-11 05:19:23 +02:00
Unrud
0060130c3b
Remove etags from raw data
...
Remove all etags that are directly calculated from data that's read from files.
1. They are not used anywhere (luckily).
2. Etags that are send to clients are calculated from the output of vobject's serialize method. If files are edited externally and vobject normalizes them (like wrapping long lines or replacing all line endings by \r\n), the etags that are sent to the client and the etags that are calculated from raw data will never match. If a new version of vobject is released and the formatting changes slightly, the checks will also always fail.
2016-08-11 05:05:10 +02:00
Unrud
b8126f8d24
Use os.replace instead of os.rename
...
On Windows os.replace sets the MOVEFILE_REPLACE_EXISTING flag for MoveFileEx.
On POSIX it's the same as os.rename.
2016-08-10 19:26:07 +02:00
Guillaume Ayoub
5c2075cb6c
Fix _atomic_write
2016-08-08 14:55:01 +02:00
Guillaume Ayoub
5e5b8b844f
Cosmetics
2016-08-08 13:39:01 +02:00
Guillaume Ayoub
1e5c9f63a0
Merge pull request #468 from Unrud/disablefsync
...
Add option to disable syncing to disk
2016-08-08 13:00:12 +02:00
Unrud
0675328a02
Replace collection in Collection.create_collection
2016-08-08 06:08:01 +02:00
Unrud
f5f52582a1
Add option to disable syncing to disk
...
Disabling syncing increases the risk of data loss when the system crashes or power fails. On the positive it can increase the performance to a great extent.
2016-08-08 05:20:25 +02:00
Unrud
c336e0581e
Remove atomicwrites
...
Unfortunately the library doesn't support disabling of disk syncing, fortunately we only need a small subset of it's functionality which is easy to implement.
2016-08-08 05:02:36 +02:00
Unrud
3c736cade8
Refactor: Move sync_directory into Collection class
...
This is not used anywhere else.
2016-08-08 04:07:01 +02:00
Unrud
cfa8c7d8b4
Set correct path for child collections
2016-08-07 17:50:31 +02:00
Guillaume Ayoub
4236077b04
Document _makedirs_synced and remove exist_ok
2016-08-06 14:08:21 +02:00
Guillaume Ayoub
4549d1b2db
Merge pull request #462 from Unrud/durabledirs
...
Durable creation of directories and make sure that the root colleciton exists.
2016-08-06 14:02:41 +02:00
Guillaume Ayoub
a7923008ce
Remove unused import
2016-08-06 13:29:07 +02:00
Guillaume Ayoub
0cda9f611d
Merge pull request #463 from Unrud/atomicmove
...
Atomic MOVE
2016-08-06 13:27:38 +02:00
Unrud
5f66d009d6
Atomic MOVE in multifilesystem
2016-08-06 05:09:06 +02:00
Unrud
23582c8208
Expose low level MOVE operation in storage.BaseCollection
2016-08-06 05:09:00 +02:00
Unrud
07dc71fd73
Update comment
2016-08-06 04:07:55 +02:00
Unrud
6c3e59fd11
Make sure that the root collection exists.
...
Since the collections are not directly in **filesystem_path** anymore,
the folder is not created by ``Collection.acquire_lock``.
2016-08-06 04:07:55 +02:00
Unrud
05a4285f54
Durable creation of intermediate directories
2016-08-06 04:07:50 +02:00
Unrud
f4eb143ba8
use tempfile to delete collection
2016-08-05 17:40:47 +02:00
Unrud
5a9d956b49
delete atomic and durable
...
See #440
2016-08-05 17:40:47 +02:00
Guillaume Ayoub
50438bc2c0
Remove fixed TODOs
2016-08-05 02:57:17 +02:00