Skip to content

Commit

Permalink
Sorbet fix (#716)
Browse files Browse the repository at this point in the history
* Dropping sorbet version

* Bump bundler version

* Cleaner end time logic in poller
  • Loading branch information
mbianco-stripe authored Aug 29, 2022
1 parent bef15df commit 2d310f5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ git_source(:github) {|repo| "https://github.com/#{repo}.git" }

ruby '2.7.6'

gem 'sorbet', '~> 0.5.10382', group: :development
gem 'sorbet', '~> 0.5.10346', group: :development
if ENV.fetch('NO_SORBET_RUNTIME', 'false') != 'true'
gem 'sorbet-runtime', '~> 0.5.10382', require: true
gem 'sorbet-runtime', '~> 0.5.10346', require: true
else
puts "Skipping sorbet-runtime"
end
Expand Down
19 changes: 8 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0901)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.16.3)
minitest-ci (3.4.0)
minitest (>= 5.0.6)
Expand All @@ -214,9 +213,6 @@ GEM
ruby2_keywords (~> 0.0.1)
netrc (0.11.0)
nio4r (2.5.8)
nokogiri (1.13.8)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.8-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.8-x86_64-darwin)
Expand Down Expand Up @@ -390,8 +386,8 @@ GEM
rack-protection (= 2.2.2)
tilt (~> 2.0)
slop (3.6.0)
sorbet (0.5.10382)
sorbet-static (= 0.5.10382)
sorbet (0.5.10346)
sorbet-static (= 0.5.10346)
sorbet-coerce (0.5.0)
polyfill (~> 1.8)
safe_type (~> 1.1, >= 1.1.1)
Expand All @@ -403,7 +399,9 @@ GEM
sorbet-coerce (>= 0.2.6)
sorbet-runtime (>= 0.5.9892)
sorbet-runtime (0.5.10382)
sorbet-static (0.5.10382-x86_64-linux)
sorbet-static (0.5.10346-universal-darwin-20)
sorbet-static (0.5.10346-universal-darwin-21)
sorbet-static (0.5.10346-x86_64-linux)
spring (4.0.0)
sprockets (4.1.1)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -440,7 +438,6 @@ GEM

PLATFORMS
arm64-darwin-21
ruby
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux
Expand Down Expand Up @@ -500,9 +497,9 @@ DEPENDENCIES
sentry-ruby (~> 5.4.2)
sequel (= 5.59.0)
simple_structured_logger (~> 1.0.2)
sorbet (~> 0.5.10382)
sorbet (~> 0.5.10346)
sorbet-rails (~> 0.7.34)
sorbet-runtime (~> 0.5.10382)
sorbet-runtime (~> 0.5.10346)
spring
stripe (~> 7.1.0)
webdrivers (~> 5.0.0)
Expand All @@ -511,4 +508,4 @@ RUBY VERSION
ruby 2.7.6p207

BUNDLED WITH
2.3.9
2.3.21
2 changes: 1 addition & 1 deletion bin/pre-setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [[ -z $(which bundle) ]]; then
echo "Bundler not installed; installing latest 2.x..."
gem install bundler:2.3.9
gem install bundler:2.3.21
fi

gem install foreman
Expand Down
7 changes: 5 additions & 2 deletions lib/stripe-force/jobs/order_poller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ def perform
return if !should_poll?(execution_time, poll_record)

poll_record = T.must(poll_record)
end_time = poll_record.last_polled_at

log.info 'initiating poll', from: poll_record.last_polled_at, to: execution_time
log.info 'initiating poll',
from: end_time,
to: execution_time

# note that SF fields never contain empty strings, they are reported null instead
updated_orders = @user.sf_client.query(generate_soql(poll_record.last_polled_at, execution_time))
updated_orders = @user.sf_client.query(generate_soql(end_time, execution_time))

# important to use `size` here and not count because of the paging issue described below
log.info 'order query complete', size: updated_orders.size
Expand Down

0 comments on commit 2d310f5

Please sign in to comment.