Avoid "RuntimeError: can't modify frozen Time".
This commit is contained in:
parent
e3214e3ac2
commit
e76422952c
2 changed files with 9 additions and 10 deletions
12
Gemfile.lock
12
Gemfile.lock
|
@ -95,7 +95,7 @@ GEM
|
|||
diffy (3.1.0)
|
||||
dnsruby (1.59.3)
|
||||
docile (1.1.5)
|
||||
domain_name (0.5.20160826)
|
||||
domain_name (0.5.20170404)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
doorkeeper (4.2.0)
|
||||
railties (>= 4.2)
|
||||
|
@ -164,9 +164,9 @@ GEM
|
|||
http-cookie (~> 1.0)
|
||||
http-form_data (~> 1.0.1)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
http-cookie (1.0.2)
|
||||
http-cookie (1.0.3)
|
||||
domain_name (~> 0.5)
|
||||
http-form_data (1.0.1)
|
||||
http-form_data (1.0.3)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.8.4)
|
||||
icalendar (2.4.1)
|
||||
|
@ -199,7 +199,7 @@ GEM
|
|||
multi_json (1.12.1)
|
||||
multi_xml (0.5.5)
|
||||
multipart-post (2.0.0)
|
||||
mysql2 (0.4.4)
|
||||
mysql2 (0.4.6)
|
||||
naught (1.1.0)
|
||||
nenv (0.3.0)
|
||||
nestful (1.1.1)
|
||||
|
@ -381,7 +381,7 @@ GEM
|
|||
thread_safe (0.3.6)
|
||||
tilt (2.0.5)
|
||||
tins (1.13.0)
|
||||
twitter (5.16.0)
|
||||
twitter (5.17.0)
|
||||
addressable (~> 2.3)
|
||||
buftok (~> 0.2.0)
|
||||
equalizer (= 0.0.10)
|
||||
|
@ -398,7 +398,7 @@ GEM
|
|||
execjs (>= 0.3.0, < 3)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.2)
|
||||
unf_ext (0.0.7.4)
|
||||
unicode-display_width (1.1.1)
|
||||
unicorn (5.2.0)
|
||||
kgio (~> 2.6)
|
||||
|
|
|
@ -304,14 +304,13 @@ returns
|
|||
next if !track_retweets? && tweet.retweet?
|
||||
|
||||
# ignore older messages
|
||||
if (@channel.created_at - 15.days) > tweet.created_at || older_import >= older_import_max
|
||||
if (@channel.created_at - 15.days) > tweet.created_at.dup.utc || older_import >= older_import_max
|
||||
older_import += 1
|
||||
Rails.logger.debug "tweet to old: #{tweet.id}/#{tweet.created_at}"
|
||||
next
|
||||
end
|
||||
|
||||
next if @rest_client.locale_sender?(tweet) && own_tweet_already_imported?(tweet)
|
||||
|
||||
next if Ticket::Article.find_by(message_id: tweet.id)
|
||||
break if @rest_client.tweet_limit_reached(tweet)
|
||||
@rest_client.to_group(tweet, search[:group_id], @channel)
|
||||
|
@ -329,7 +328,7 @@ returns
|
|||
next if !track_retweets? && tweet.retweet?
|
||||
|
||||
# ignore older messages
|
||||
if (@channel.created_at - 15.days) > tweet.created_at || older_import >= older_import_max
|
||||
if (@channel.created_at - 15.days) > tweet.created_at.dup.utc || older_import >= older_import_max
|
||||
older_import += 1
|
||||
Rails.logger.debug "tweet to old: #{tweet.id}/#{tweet.created_at}"
|
||||
next
|
||||
|
@ -349,7 +348,7 @@ returns
|
|||
@rest_client.client.direct_messages(full_text: 'true').each { |tweet|
|
||||
|
||||
# ignore older messages
|
||||
if (@channel.created_at - 15.days) > tweet.created_at || older_import >= older_import_max
|
||||
if (@channel.created_at - 15.days) > tweet.created_at.dup.utc || older_import >= older_import_max
|
||||
older_import += 1
|
||||
Rails.logger.debug "tweet to old: #{tweet.id}/#{tweet.created_at}"
|
||||
next
|
||||
|
|
Loading…
Reference in a new issue