class ShardsDB
- ShardsDB
- Reference
- Object
Defined in:
db.crConstant Summary
-
JOBS_CHANNEL =
"jobs"
Constructors
Class Method Summary
- .application_name : String | Nil
- .application_name=(application_name : String | Nil)
- .connect(&)
- .database_url : String
- .database_url=(database_url : String)
- .db
- .listen_for_jobs(&block : PQ::Notification -> )
- .statement_timeout : String | Nil
- .statement_timeout=(statement_timeout : String | Nil)
- .transaction(&)
Instance Method Summary
- #all_categories
- #all_releases(shard_id : Int64)
- #connection : DB::Connection
- #create_category(category : Category)
- #create_owner(owner : Repo::Owner)
- #create_release(shard_id : Int64, release : Release, position : Int | Nil = nil)
- #create_repo(repo : Repo)
- #create_shard(shard : Shard)
- #delete_categorizations(repo_refs : Array(Repo::Ref))
- #delete_file(release_id, path)
- #fetch_file(release_id, path)
- #find_canonical_ref?(shard_id)
- #find_canonical_repo(shard_id : Int64)
- #find_mirror_repos(shard_id : Int64)
- #get_owned_repos(owner_id : Int64)
- #get_owner?(resolver : String, slug : String)
- #get_owner?(repo_ref : Repo::Ref)
- #get_repo(repo_id : Int64)
- #get_repo(repo_ref : Repo::Ref)
- #get_repo?(repo_ref : Repo::Ref)
- #get_repo_id(resolver : String, url : String)
- #get_repo_id(repo_ref : Repo::Ref)
- #get_repo_id?(resolver : String, url : String)
- #get_repo_id?(repo_ref : Repo::Ref)
- #get_shard(shard_id : Int64)
- #get_shard_id(name : String, qualifier : String = "")
- #get_shard_id?(name : String, qualifier : Nil)
- #get_shard_id?(name : String, qualifier : String = "")
- #get_shards
- #last_activities
- #last_catalog_import : Time | Nil
- #last_metrics_calc : Time | Nil
- #last_repo_sync : Time | Nil
-
#log_activity(event : String, repo_id : Int64 | Nil = nil, shard_id : Int64 | Nil = nil, metadata = nil, exc = nil)
LOGGING
- #put_file(release_id, path, content)
- #remove_category(slug : String)
- #repo_sync_failed(repo)
- #repos_pending_sync
- #send_job_notification(message)
- #set_owner(repo_ref : Repo::Ref, owner_id : Int64)
- #shards_in_category(category_id : Int64 | Nil)
- #sql_array(array)
- #update_categorization(repo_ref : Repo::Ref, categories : Array(String))
- #update_categorization(shard_id : Int64, categories : Array(String))
- #update_category(category : Category)
- #update_owner_shards_count(owner_id : Int64)
- #update_release(release : Release)
- #upsert_dependency(release_id : Int64, dependency : Dependency, repo_id = nil)
Constructor Detail
Class Method Detail
Instance Method Detail
def log_activity(event : String, repo_id : Int64 | Nil = nil, shard_id : Int64 | Nil = nil, metadata = nil, exc = nil)
#
LOGGING