Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

standby: add standby mode #1365

Merged
merged 6 commits into from Jan 25, 2017
Merged

standby: add standby mode #1365

merged 6 commits into from Jan 25, 2017

Conversation

jeffkaufman
Copy link
Contributor

@jeffkaufman jeffkaufman commented Jan 19, 2017

Add standby mode for ngx_pagespeed, equivalent to "off" in mod_pagespeed.

With this change "off" is deprecated, and people should use "unplugged" instead.

See also: apache/incubator-pagespeed-mod#1482

Fixes: #968

Add standby mode for ngx_pagespeed, equivalent to "off" in mod_pagespeed.

With this change "off" is deprecated, and people should use "unplugged" instead.
// Also, "off" is deprecated and people should be using "standby" or
// "unplugged" now depending on which sense they want. See comment on
// RewriteOptions::EnabledEnum.
enabled = RewriteOptions::kEnabledUnplugged;
Copy link
Contributor

Choose a reason for hiding this comment

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

I am kinda wondering if the mod_pagespeed parser shouldn't do the same and we shouldn't kill the Off enum... Seems a little easier to think of this way, even if it would risk making some of the parsing redundant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good idea! Let me try that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Getting rid of EnabledOff turns out to be pretty hard. We have a nice option parsing abstraction that isn't compatible with the idea that "off" should map to one value in one server and another value in another server. It would be possible to extend this, but I don't think it's worth it seeing as once we're done parsing the options everything just asks about enabled() and unplugged() and doesn't see the enums.

@jeffkaufman jeffkaufman merged commit a7d1f91 into master Jan 25, 2017
@jeffkaufman jeffkaufman deleted the jefftk-standby branch January 25, 2017 18:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants