This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.nio.file.Paths; | |
import com.amazonaws.services.lambda.runtime.RequestStreamHandler; | |
import com.amazonaws.services.lambda.runtime.Context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
START RequestId: caa0d7b1-d626-11e8-8cd7-4be3c49bb13e Version: $LATEST | |
Could not load platform constants for OpenFlags: java.lang.RuntimeException | |
java.lang.RuntimeException: Could not load platform constants for OpenFlags | |
at jnr.constants.platform.ConstantResolver.getConstants(ConstantResolver.java:227) | |
at jnr.constants.platform.ConstantResolver.lookupAndCacheConstant(ConstantResolver.java:128) | |
at jnr.constants.platform.ConstantResolver.getConstant(ConstantResolver.java:116) | |
at jnr.constants.platform.ConstantResolver.longValue(ConstantResolver.java:179) | |
at jnr.constants.platform.OpenFlags.intValue(OpenFlags.java:31) | |
at org.jruby.RubyFile.createFileClass(RubyFile.java:135) | |
at org.jruby.Ruby.initCore(Ruby.java:1547) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
START RequestId: 58cbe585-d3e1-11e8-a5a7-efc54ba73b45 Version: $LATEST | |
Could not load platform constants for OpenFlags: java.lang.RuntimeException | |
java.lang.RuntimeException: Could not load platform constants for OpenFlags | |
at jnr.constants.platform.ConstantResolver.getConstants(ConstantResolver.java:227) | |
at jnr.constants.platform.ConstantResolver.lookupAndCacheConstant(ConstantResolver.java:128) | |
at jnr.constants.platform.ConstantResolver.getConstant(ConstantResolver.java:116) | |
at jnr.constants.platform.ConstantResolver.longValue(ConstantResolver.java:179) | |
at jnr.constants.platform.OpenFlags.intValue(OpenFlags.java:30) | |
at org.jruby.RubyFile.createFileClass(RubyFile.java:140) | |
at org.jruby.Ruby.initCore(Ruby.java:1547) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ rake test | |
/Users/Serah/dev/misc/jrjackson/test/jrjackson_test.rb:343: warning: Ambiguous first argument; make sure. | |
/Users/Serah/dev/misc/jrjackson/test/jrjackson_test.rb:373: warning: Ambiguous first argument; make sure. | |
/Users/Serah/.rbenv/versions/jruby-9.2.0.0/lib/ruby/gems/shared/gems/power_assert-1.1.3/lib/power_assert.rb:8: warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag | |
/Users/Serah/.rbenv/versions/jruby-9.2.0.0/lib/ruby/gems/shared/gems/power_assert-1.1.3/lib/power_assert.rb:8: warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag | |
Loaded suite /Users/Serah/.rbenv/versions/jruby-9.2.0.0/lib/ruby/gems/shared/gems/rake-12.3.1/lib/rake/rake_test_loader | |
Started | |
.F | |
================================================================================ | |
org/jruby/RubyKernel.java:1175:in `catch' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NEW Everyone Who Has Not Purchased (1214) | |
Customers: 459545 | |
Emails: 459543 | |
{"top_five_product_ids"=>[], | |
"month_to_date_sales"=>0.0, | |
"total_sales"=>0.0, | |
"sales_by_month"=>{}, | |
"lifetime_sales"=>0.0, | |
"average_order_value"=>0.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NEW Everyone Who Has Not Purchased (1107) | |
Customers: 370338 | |
Emails: 370316 | |
{"top_five_product_ids"=>[], | |
"month_to_date_sales"=>0.0, | |
"total_sales"=>0.0, | |
"sales_by_month"=>{}, | |
"lifetime_sales"=>0.0, | |
"average_order_value"=>0.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NEW Everyone Who Has Not Purchased (3753) | |
Customers: 17411 | |
Emails: 17411 | |
{"top_five_product_ids"=>[], | |
"month_to_date_sales"=>0.0, | |
"total_sales"=>0.0, | |
"sales_by_month"=>{}, | |
"lifetime_sales"=>0.0, | |
"average_order_value"=>0.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NEW Everyone Who Has Not Purchased (3285) | |
Customers: 90344 | |
Emails: 90335 | |
{"top_five_product_ids"=>[], | |
"month_to_date_sales"=>0.0, | |
"total_sales"=>0.0, | |
"sales_by_month"=>{}, | |
"lifetime_sales"=>0.0, | |
"average_order_value"=>0.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include RedisCache | |
updater = Customer.mongo_client['customers'] | |
start = 5000 | |
lastid, lastaov = nil, nil | |
while (aovs = redis.zrange 'average_order_values', start, start + 999, withscores: true).present? | |
redis.pipelined do | |
aovs.each do |id, aov| | |
lastid, lastaov = id, aov | |
updater.find_one_and_update({ _id: BSON::ObjectId.from_string(id) }, { '$set' => { average_order_value: aov } }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Store ID | Store Type | Total Customers | Customers Without Email | System Segments | Custom Segments | Newsletters | System Segments in Newsletters | System Segments NOT in Newsletters | Custom Segments in Newsletters | Custom Segments NOT in Newsletters | |
---|---|---|---|---|---|---|---|---|---|---|---|
1836 | Magento | 0 | 0 | 38 | 0 | 0 | 0 | 38 | 0 | 0 | |
3914 | Magento | 257 | 0 | 38 | 0 | 0 | 0 | 38 | 0 | 0 | |
3881 | Shopify | 1438 | 0 | 38 | 8 | 17 | 0 | 38 | 0 | 8 | |
3294 | Magento | 9126 | 0 | 38 | 2 | 0 | 0 | 38 | 0 | 2 | |
2143 | Magento | 5438 | 0 | 38 | 0 | 0 | 0 | 38 | 0 | 0 | |
2849 | Magento | 20401 | 0 | 38 | 0 | 0 | 0 | 38 | 0 | 0 | |
4863 | Magento | 1232 | 0 | 38 | 0 | 0 | 0 | 38 | 0 | 0 | |
2977 | Magento | 238508 | 0 | 38 | 3 | 126 | 0 | 38 | 0 | 3 | |
2313 | Magento | 331 | 0 | 38 | 1 | 0 | 0 | 38 | 0 | 1 |
NewerOlder