Add toggl refetch on loading a page and start to make active cable work
This commit is contained in:
@@ -87,12 +87,16 @@ class ScrapeTogglJob < ApplicationJob
|
||||
toggl_data: entry,
|
||||
associated_toggl_entry_id: entry['time_entries'][0]['id'],
|
||||
)
|
||||
|
||||
broadcast_update_to lecture, :status
|
||||
elsif (lecture_title_match = entry_title.match(review_regex)) and (lecture = lectures.find_by(title: lecture_title_match[1]))
|
||||
lecture.tracked_time_entries.create!(
|
||||
kind: :review,
|
||||
toggl_data: entry,
|
||||
associated_toggl_entry_id: entry['time_entries'][0]['id'],
|
||||
)
|
||||
|
||||
broadcast_update_to lecture, :status
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user