Skip to content

Commit 4de93c8

Browse files
authored
add opti config, remove sleep time
1 parent 783ac23 commit 4de93c8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

myapp.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
# Initialize an Optimizely client
77
optimizely_client = Optimizely::OptimizelyFactory.custom_instance('TbrfRLeKvLyWGusqANoeR', nil, nil, logger=Optimizely::SimpleLogger.new(Logger::INFO))
88

9-
# config = optimizely_client.get_optimizely_config
9+
config = optimizely_client.get_optimizely_config
1010

1111
attributes = {"laptop_os" => "mac"}
1212

1313
# user = optimizely_client.create_user_context('12345', attributes) # regular attributes, user context takes any user id - important when running these 3 lines I need to adjust the audience in the app (use the correct one)!!!
1414
user = optimizely_client.create_user_context('fs-id-12', attributes) # prebuilt segments (no lists), valid user id is fs-id-12 (matches DOB)
1515
# user = optimizely_client.create_user_context('fs-id-6', attributes) # list segment, valid use is fs-id-6
1616

17-
sleep(1) # sleep is needed for datafile to load - check this, might be an issue
18-
1917
user.fetch_qualified_segments()
2018
segments = user.qualified_segments()
2119

0 commit comments

Comments
 (0)