perkeep/pkg/importer/flickr
Brad Fitzpatrick 382794c6ba importer: make RunContext.Context be a read-only accessor
The Picasa importer was deadlocking inside the golang.org/x/oauth2
package because the Picasa code was mutating its parent's context and
accidentally creating a cycle of *oauth2.reuseTokenSource values
(double-acquisition of the reuseTokenSource's sync.Mutex was the
deadlock)

The Picasa code really just wanted to create a subcontext from the
base context, where the subcontext did the oauth2 wrapping, but then
picasa was storing that subcontext in the
camlistore.org/pkg/importer-provided mutable "RunContext" structure's
public, embedded "context.Context" field. Unfortunately, the picasa
importer code had already used that *RunContext (pre-mutation) as the
context.Context for the base HTTP client.

This change changes the camlistore.org/pkg/importer.RunContext to not
have a public embedded Context field. Instead, it only has a read-only
accessor to get at the base context, similar to Go 1.7's
net/http.Request.Context() field. This will prevent this class of
error in the future.

Fixes #698

Change-Id: I9114b64aa1bfd7ea83b36ea1ab18ed88b4a44f7e
2016-04-25 14:30:39 -07:00
..
README Remove some code.google.com references. 2014-12-11 17:33:17 +11:00
flickr.go importer: make RunContext.Context be a read-only accessor 2016-04-25 14:30:39 -07:00
flickr_test.go pkg/importer/flickr: fix photosSearchItem unmarshal 2015-07-08 06:41:11 +02:00
testdata.go path fixes for third_party move 2016-04-21 12:25:17 -07:00

README

Flickr Importer
===============

This is an incomplete Camlistore importer for Flickr. So far it can import the
first 100 photos from a photostream and also their set metadata.

To use:

1) Fill out http://www.flickr.com/services/apps/create/noncommercial/ to get a
   Flickr API key and secret.
2) Start the devcam server with flickrapikey flag:
   $ devcam server -flickrapikey=<apikey>:<secret>
3) Navigate to http://<server>/importer-flickr/login
4) Watch import progress on the command line


TODO:

https://github.com/camlistore/camlistore/issues?q=is%3Aopen+flickr+