Skip to content

Conversation

jewel-andraia
Copy link

@jewel-andraia jewel-andraia commented Jul 26, 2016

If the subreddit environment variable is a plus sign-separated list of subreddits, eg. pics+funny, then deploy the stylesheet and images to both /r/pics and /r/funny.

⚠️ Untested

If the `subreddit` environment variable is a comma-separated list of subreddits, eg. `pics+funny`, then deploy the stylesheet to both /r/pics and /r/funny.
)(**data)
for subreddit in os.getenv('subreddit').split('+'):
deploy_data = {'subreddit': subreddit}
for image, exists in diff.items():
Copy link
Owner

@13steinj 13steinj Jul 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running for loops consecutively is slow cause CPython isn't a JIT compiler. Do you mind moving things around so the "subreddit" for loop occurs within the diff loop, data initially being an empty dict instead of a copied version of deploydata, and then set 'subreddit' on it within that loop?

E: grammar

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm no saint on this, but any updates? Or if you don't have the time, may I squash and merge?

Copy link
Author

@jewel-andraia jewel-andraia Jun 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, go ahead and merge/rework it however you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants