Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/workers/clean_rejected_tx_worker.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.Check every pending transaction in the pool if rejected
# 2.When a pending tx import to db and the same tx was import by node processor,it will exist two same tx with different status
# 1. Check every pending transaction in the pool if rejected
# 2. When a pending tx is imported to db and the same tx was imported by node processor, it will exist two same tx with different status
class CleanRejectedTxWorker
include Sidekiq::Worker
sidekiq_options retry: 0
Expand Down
4 changes: 2 additions & 2 deletions app/workers/pool_transaction_check_worker.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 1.Check every pending transaction in the pool if rejected
# 2.When a pending tx import to db and the same tx was import by node processor,it will exist two same tx with different status
# 1. Check every pending transaction in the pool if rejected
# 2. When a pending tx is imported to db and the same tx was imported by node processor, it will exist two same tx with different status
class PoolTransactionCheckWorker
include Sidekiq::Worker
sidekiq_options retry: 0
Expand Down
6 changes: 3 additions & 3 deletions config/initializers/new_framework_defaults_7_0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# Rails.application.config.action_view.apply_stylesheet_media_default = false

# Change the digest class for the key generators to `OpenSSL::Digest::SHA256`.
# Changing this default means invalidate all encrypted messages generated by
# your application and, all the encrypted cookies. Only change this after you
# Changing this default means invalidating all encrypted messages generated by
# your application and all the encrypted cookies. Only change this after you
# rotated all the messages using the key rotator.
#
# See upgrading guide for more information on how to build a rotator.
Expand All @@ -42,7 +42,7 @@

# Define the isolation level of most of Rails internal state.
# If you use a fiber based server or job processor, you should set it to `:fiber`.
# Otherwise the default of `:thread` if preferable.
# Otherwise the default of `:thread` is preferable.
# Rails.application.config.active_support.isolation_level = :thread

# Set both the `:open_timeout` and `:read_timeout` values for `:smtp` delivery method.
Expand Down
2 changes: 1 addition & 1 deletion lib/ckb_block_node_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
remain = 0
duration = 0
loop do
ApplicationRecord.with_advisory_lock("CkbSyncer") do # use advisory lock to prevent two node processor
ApplicationRecord.with_advisory_lock("CkbSyncer") do # use advisory lock to prevent two node processors
start = Time.now.to_f
block = CkbSync::NewNodeDataProcessor.new.call
if block
Expand Down
2 changes: 1 addition & 1 deletion test/workers/charts/daily_statistic_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class DailyStatisticTest < ActiveSupport::TestCase
Charts::DailyStatistic.new.perform(1.day.ago)
assert_equal 2, ::DailyStatistic.count

# it's very wired that this unit test would fail in test environment in github.
# it's very weird that this unit test would fail in test environment in github.
# assert_equal Time.at(::DailyStatistic.last.created_at_unixtimestamp).strftime("%Y-%m-%d"), 1.day.ago.strftime("%Y-%m-%d")
assert_equal block.timestamp, ::DailyStatistic.last.block_timestamp
end
Expand Down