Skip to content

Commit

Permalink
feat(llm/schedule): add some debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Oct 18, 2023
1 parent 88bc660 commit 33ebcfe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/place/llm/schedule.cr
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class Place::Schedule < PlaceOS::Driver
starting = now.at_beginning_of_day + days
ending = now.at_end_of_day + days

logger.debug { "requesting events for #{me.name} (#{me.email}) @ #{starting} -> #{ending}" }

events = cal_client.list_events(me.email, period_start: starting, period_end: ending)
events = Array(Event).from_json(events.to_json)
events.each { |event| event.configure_times(timezone) }
Expand Down Expand Up @@ -170,11 +172,11 @@ class Place::Schedule < PlaceOS::Driver

record AccessToken, token : String, expires : Int64? { include JSON::Serializable }

def get_users_access_token
protected def get_users_access_token
AccessToken.from_json staff_api.user_resource_token.get.to_json
end

def place_calendar_client : ::PlaceCalendar::Client
protected def place_calendar_client : ::PlaceCalendar::Client
token = get_users_access_token

case @platform
Expand Down

0 comments on commit 33ebcfe

Please sign in to comment.