Skip to content

Commit

Permalink
feat: enhance analyze contract worker
Browse files Browse the repository at this point in the history
Signed-off-by: Miles Zhang <[email protected]>
  • Loading branch information
zmcNotafraid committed Dec 3, 2024
1 parent f886b3e commit de37612
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def perform
contract_attrs = Set.new
cell_deps_attrs = []

CellDependency.where(contract_analyzed: false).limit(1000).each do |cell_dep|
CellDependency.where(contract_analyzed: false).order("block_number desc").limit(1000).each do |cell_dep|
cell_deps_attrs << { contract_analyzed: true, ckb_transaction_id: cell_dep.ckb_transaction_id, contract_cell_id: cell_dep.contract_cell_id, dep_type: cell_dep.dep_type }

next if CellDepsOutPoint.where(contract_cell_id: cell_dep.contract_cell_id).exists?
Expand Down
2 changes: 1 addition & 1 deletion lib/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def call_worker(clz)
call_worker GenerateUdtHolderAllocationWorker
end

s.every "10s", overlap: false do
s.every "5s", overlap: false do
call_worker AnalyzeContractFromCellDependencyWorker
end

Expand Down

0 comments on commit de37612

Please sign in to comment.