Merge pull request #969 from warpc/reduce-count-of-publishing-build-lists-in-task
reduce count of build lists in one task
This commit is contained in:
commit
01d0fe211b
|
@ -195,7 +195,7 @@ module AbfWorker
|
||||||
order(:updated_at)
|
order(:updated_at)
|
||||||
locked_ids = @redis.lrange(LOCKED_BUILD_LISTS, 0, -1)
|
locked_ids = @redis.lrange(LOCKED_BUILD_LISTS, 0, -1)
|
||||||
build_lists = build_lists.where('build_lists.id NOT IN (?)', locked_ids) unless locked_ids.empty?
|
build_lists = build_lists.where('build_lists.id NOT IN (?)', locked_ids) unless locked_ids.empty?
|
||||||
build_lists = build_lists.limit(1000)
|
build_lists = build_lists.limit(50)
|
||||||
|
|
||||||
projects_for_cleanup = @redis.lrange(PROJECTS_FOR_CLEANUP, 0, -1).
|
projects_for_cleanup = @redis.lrange(PROJECTS_FOR_CLEANUP, 0, -1).
|
||||||
select{ |k| k =~ /#{save_to_repository_id}\-#{build_for_platform_id}$/ }
|
select{ |k| k =~ /#{save_to_repository_id}\-#{build_for_platform_id}$/ }
|
||||||
|
|
Loading…
Reference in New Issue