Skip to content

Commit

Permalink
Merge branch 'master' into fix/mulesoft_exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
w-le authored May 24, 2021
2 parents cb27903 + 1a25032 commit d25cf4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .ameba.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Excluded:
- repositories/**/*.cr

# NOTE: These should all be reviewed on an individual basis to see if their
# complexity can be reasonably reduced.
Metrics/CyclomaticComplexity:
Expand Down
4 changes: 2 additions & 2 deletions drivers/mulesoft/calendar_exporter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ class MuleSoft::CalendarExporter < PlaceOS::Driver
@time_zone = Time::Location.load(@time_zone_string.not_nil!) if @time_zone_string
self[:timezone] = @time_zone.to_s

subscription = system.subscribe(:Bookings_1, :bookings) do |subscription, mulesoft_bookings|
subscription = system.subscribe(:Bookings_1, :bookings) do |_subscription, mulesoft_bookings|
logger.debug { "DETECTED changed in Mulesoft Bookings..." }
@bookings = Array(Hash(String, Int64 | String | Nil)).from_json(mulesoft_bookings)
logger.debug { "#{@bookings.size} bookings in total" }
self[:total_bookings] = @bookings.size

update_events
@bookings.each { |b| export_booking(b) }
end
Expand Down

0 comments on commit d25cf4c

Please sign in to comment.