Remove all calls to framework.db.sync and make this method a no-op now that the task manager is no longer used.
git-svn-id: file:///home/svn/framework3/trunk@12708 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
e09d4fb771
commit
c5c679cdb7
|
@ -170,11 +170,6 @@ module Auxiliary::HttpCrawler
|
||||||
# Extract any interesting data from the page
|
# Extract any interesting data from the page
|
||||||
crawler_process_page(t, page, cnt)
|
crawler_process_page(t, page, cnt)
|
||||||
|
|
||||||
# Sync the database every 100 items
|
|
||||||
if cnt % 100 == 0
|
|
||||||
framework.db.sync
|
|
||||||
end
|
|
||||||
|
|
||||||
# Blow up if we hit our maximum page count
|
# Blow up if we hit our maximum page count
|
||||||
if cnt >= max_page_count
|
if cnt >= max_page_count
|
||||||
print_error("Maximum page count reached for #{url}")
|
print_error("Maximum page count reached for #{url}")
|
||||||
|
|
|
@ -195,8 +195,7 @@ class DBManager
|
||||||
# Wait for all pending write to finish
|
# Wait for all pending write to finish
|
||||||
#
|
#
|
||||||
def sync
|
def sync
|
||||||
task = queue( Proc.new { } )
|
# There is no more queue.
|
||||||
task.wait
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -43,8 +43,7 @@ class Db
|
||||||
"db_status" => "Show the current database status",
|
"db_status" => "Show the current database status",
|
||||||
# Deprecated
|
# Deprecated
|
||||||
"db_create" => "Create a brand new database",
|
"db_create" => "Create a brand new database",
|
||||||
"db_destroy" => "Drop an existing database",
|
"db_destroy" => "Drop an existing database"
|
||||||
"db_sync" => "Synchronize the database",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
more = {
|
more = {
|
||||||
|
@ -293,19 +292,6 @@ class Db
|
||||||
set_rhosts_from_addrs(rhosts) if set_rhosts
|
set_rhosts_from_addrs(rhosts) if set_rhosts
|
||||||
end
|
end
|
||||||
|
|
||||||
def cmd_db_sync_help
|
|
||||||
print_line "Usage: db_sync"
|
|
||||||
print_line
|
|
||||||
print_line "Wait for all pending database writes to complete"
|
|
||||||
print_line
|
|
||||||
end
|
|
||||||
|
|
||||||
def cmd_db_sync(*args)
|
|
||||||
return unless active?
|
|
||||||
print_status("Synchronizing the database...")
|
|
||||||
framework.db.sync
|
|
||||||
end
|
|
||||||
|
|
||||||
def cmd_db_services_help
|
def cmd_db_services_help
|
||||||
# Like db_hosts, use "-h" instead of recreating the column list
|
# Like db_hosts, use "-h" instead of recreating the column list
|
||||||
# here
|
# here
|
||||||
|
|
Loading…
Reference in New Issue