Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay on custom domain list status #76

Open
kimyu92 opened this issue Jun 22, 2017 · 3 comments
Open

Delay on custom domain list status #76

kimyu92 opened this issue Jun 22, 2017 · 3 comments

Comments

@kimyu92
Copy link

kimyu92 commented Jun 22, 2017

platform = PlatformAPI.connect_oauth(key)
hostnames = heroku.domain.list(app_name).map { |x| x['hostname'] }
platform.domain.create(APP_NAME, 'hostname' => "www.sampleDomain.com") unless 

# create domain
hostnames.include? "www.someDomain.com"
=> {"acm_status"=>nil, "app"=>{...}, "cname"=>"www.sampleDomain.com.herokudns.com", "created_at"=>..., "hostname"=>"www.sampleDomain.com", "kind"=>"custom", "status"=>"succeeded", "updated_at"=>....}

# check in the list
platform.domain.list(APP_NAME).map { |x| x['hostname'] }.include? "www.sampleDomain.com"
=> false # any reason?

Sometimes, it took about 15 mins+ for the custom domain to be found in list.
Is there a way to tell whether the custom domain will be added to the list?
Can I rely on domain.list api? If not, what is the alternative?

@mikehale
Copy link
Contributor

This sounds like a caching issue. We should fix that but in the meantime as a workaround you can disable caching of responses. See #15 (comment)

@kimyu92
Copy link
Author

kimyu92 commented Jun 22, 2017

@mikehale At least there is a workaround, thanks!

@mikehale
Copy link
Contributor

/cc @heroku/core-services

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

No branches or pull requests

2 participants