Commit Graph

475 Commits

Author SHA1 Message Date
Sybren A. Stüvel 0daaefdcc3 Retry with unique username both on PUT and POST. 2016-06-01 10:33:01 +02:00
Sybren A. Stüvel fb020ae4b4 Added unit test for refreshing links upon fetching a file document. 2016-05-31 17:56:24 +02:00
Sybren A. Stüvel 8761dd1b91 Convert images to RGB before thumbnailing and writing as JPEG. 2016-05-31 14:44:23 +02:00
Sybren A. Stüvel c5985a3060 Even more logging to figure out why PUT/POST to user goes wrong. 2016-05-31 14:14:33 +02:00
Sybren A. Stüvel 5276d960d6 Added some extra logging to find source of 'username not unique' errors. 2016-05-31 13:37:39 +02:00
Sybren A. Stüvel 84d297a3bd Fixed issue uploading small files. 2016-05-30 16:48:47 +02:00
Sybren A. Stüvel e242701ed0 Try creating a new unique username a few times, before giving up. 2016-05-30 15:42:11 +02:00
Sybren A. Stüvel 9775c821af Fixed unit test 2016-05-30 14:32:53 +02:00
Sybren A. Stüvel a5288bd35c Don't overwrite fullname from B'ID upon login. 2016-05-30 11:41:39 +02:00
Sybren A. Stüvel 23946b1e3a After Zencoder has finished, force update of the links on next file request. 2016-05-27 16:32:52 +02:00
Sybren A. Stüvel dd90fafad4 Refuse to generate None links, fall back to '' instead. 2016-05-27 16:32:32 +02:00
Sybren A. Stüvel c13ba86323 Ignore .coverage files/dirs everywhere. 2016-05-27 16:21:23 +02:00
Sybren A. Stüvel c6e191365b Solved issue with video uploading.
Filenames were updated at GCS upon a node save, also for files that aren't
saved to GCS yet (i.e. when Zencoder is still encoding). Now we just
skip non-existing files.
2016-05-27 16:21:03 +02:00
Sybren A. Stüvel f6721c76cc Lowered log level for "unauthenticated access" message 2016-05-24 11:50:49 +02:00
Sybren A. Stüvel 17902eb730 Bumped Werkzeug to 0.11.10, this fixes our memory issue. 2016-05-24 11:38:09 +02:00
Sybren A. Stüvel f98b2a09ca Allow a user to remove themselves from any project they're in. 2016-05-24 11:18:56 +02:00
Sybren A. Stüvel fc4dfd3964 Prevent creation of superfluous user while testing 2016-05-24 11:18:28 +02:00
Sybren A. Stüvel 2b29ec8ed6 Bumped version of Werkzeug to solve the memory error with large uploads. 2016-05-24 10:49:36 +02:00
Sybren A. Stüvel f03f00163a Added generator for node types of all projects. 2016-05-23 16:50:43 +02:00
Sybren A. Stüvel cf3de95ce1 Removed is_tileable from texture variations.
Now the entire texture is either tileable or not.
2016-05-23 16:10:25 +02:00
Sybren A. Stüvel f1e58d7285 Fixed unittest 2016-05-23 15:21:56 +02:00
Sybren A. Stüvel 8ff10828c6 Cache (project_id, node_type_name) -> project mapping per request.
When returning many nodes of the same project and same node type, this
prevents us from doing the same request over and over to MongoDB,
increasing performance.
2016-05-23 15:18:23 +02:00
Sybren A. Stüvel 75738efc0d Added "runserver_profile" management command. 2016-05-23 15:17:16 +02:00
Sybren A. Stüvel 71db836d41 Increased default page size to 250. 2016-05-23 14:40:16 +02:00
Sybren A. Stüvel 1c39b4fcd7 Increased PAGINATION_LIMIT to 250.
This is a quick workaround to show group nodes with 25+ child nodes.
2016-05-23 14:10:28 +02:00
Sybren A. Stüvel 291a0b393e Added /users/me endpoint to get info about the current user.
The user must perform the request with a valid auth token.
2016-05-23 12:43:54 +02:00
Sybren A. Stüvel a6f7250eb3 Richer configuration of logging module through config{,_local}.py. 2016-05-23 12:05:56 +02:00
Sybren A. Stüvel 06ffffa044 Only import bugsnag if we're going to use it. 2016-05-23 12:05:35 +02:00
Sybren A. Stüvel 4f509951a7 Reduced the GCloud resumable upload threshold 5 MiB → 100 KiB
Files larger than the threshold are streamed from disk, smaller than the
threshold and they are loaded into memory first.
2016-05-23 11:44:49 +02:00
Sybren A. Stüvel 41a278c4f0 Removed size parameter from blob.upload_to_file() to prevent mem error
By not passing the size, the gcloud module uses os.fstat to determine
the size of the to-be-uploaded file, and switch to resumable uploads.
This should prevent memory errors uploading large files.
2016-05-23 11:44:49 +02:00
Sybren A. Stüvel 193d7cef5e Added missing role for create_file_doc 2016-05-23 11:44:49 +02:00
Sybren A. Stüvel 858a7b4bfb Delete expired authentication tokens from MongoDB.
For debugging, we keep expired tokens around for a few days, so that we
can determine that a token was expired rather than not created in the
first place. It also grants some leeway in clock synchronisation.
2016-05-23 11:42:35 +02:00
Sybren A. Stüvel 0caa2df964 Handle server-side pagination in /bcloud/texture-libraries
We keep looping over the pages until the last page is hit. As a result,
we can't forward the HTTP headers from Eve to the client.
2016-05-20 13:04:08 +02:00
Sybren A. Stüvel e0b7bcb6b7 Fix renaming file without variations.
This used to produce a KeyError.
2016-05-20 11:57:10 +02:00
Sybren A. Stüvel b77f7564b1 Fixed private but shared projects not showing up in /bcloud/texture-libraries 2016-05-20 11:53:25 +02:00
Sybren A. Stüvel 401e3a3b36 Fixed empty license_{notes,type} properties to {} instead of ''. 2016-05-20 11:28:54 +02:00
Francesco Siddi 44b07b6c6b Add update_texture_nodes_maps to manage.py 2016-05-19 12:02:08 +02:00
Francesco Siddi d0b009ef4d Utilities in manage.py to add node_types and update texture node_type 2016-05-18 17:41:16 +02:00
Francesco Siddi e9f8090497 Utility to get a node type from a project document 2016-05-18 17:41:16 +02:00
Francesco Siddi cb87bea47f Update node_type texture and group_texture 2016-05-18 17:41:16 +02:00
Sybren A. Stüvel 4b1abf5a53 Proper implementation of /bcloud/texture-libraries endpoint.
It now also checks for the existence of a group_texture node type,
and whether there are top-level group_texture nodes.
2016-05-18 16:30:14 +02:00
Sybren A. Stüvel 63f8443083 Add trailing comma to last list element. 2016-05-18 16:30:06 +02:00
Francesco Siddi b4531ab298 Add group_texture node_type on new projects 2016-05-18 14:55:09 +02:00
Francesco Siddi f448dce9fc Remove outdated manage.py commands 2016-05-18 14:54:52 +02:00
Sybren A. Stüvel e35b7711a3 Added rudimentary entry point for texture libraries.
It returns those project the user has access to that also have defined
a 'texture' node type. It should also only return those projects that
actually have a 'group_texture' node type defined, and have one more
more 'texture' nodes (i.e. projects that don't contain texture nodes
should not be returned).
2016-05-17 17:59:14 +02:00
Sybren A. Stüvel 81105102f4 Removed double check of auth token. 2016-05-17 16:54:31 +02:00
Sybren A. Stüvel bd300f6f5e Pass user's _etag when updating. 2016-05-17 14:06:38 +02:00
Sybren A. Stüvel 277e82c8e6 Added runserver_memlimit management command. 2016-05-17 13:46:39 +02:00
Sybren A. Stüvel b556caf8dd Do not configure bugsnag without API key. 2016-05-17 13:46:33 +02:00
Sybren A. Stüvel 1da077422c Fixed typo in texture node type form_schema['files'] 2016-05-17 11:43:31 +02:00