From b293a1edbdb45d2207f804a12de6a48f0a5520a4 Mon Sep 17 00:00:00 2001
From: "Antoine R. Dumont (@ardumont)" <antoine.romain.dumont@gmail.com>
Date: Fri, 15 Feb 2019 23:29:38 +0100
Subject: [PATCH] lister-github: Update configuration

Related T1525
---
 data/defaults.yaml                                    | 11 +++++++++++
 .../manifests/swh/deploy/worker/swh_lister_github.pp  |  4 ++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/data/defaults.yaml b/data/defaults.yaml
index d81a39cd5..5e32c8067 100644
--- a/data/defaults.yaml
+++ b/data/defaults.yaml
@@ -1915,6 +1915,7 @@ swh::deploy::worker::swh_loader_svn::task_broker: "%{hiera('swh::deploy::worker:
 swh::deploy::worker::swh_loader_svn::config:
   storage: "%{alias('swh::remote_service::storage::config')}"
 
+swh::deploy::worker::swh_lister_github::config_file: "%{hiera('swh::conf_directory')}/lister_github.yml"
 swh::deploy::worker::swh_lister_github::concurrency: 1
 swh::deploy::worker::swh_lister_github::loglevel: warning
 # Contains a password: in private data
@@ -1931,6 +1932,16 @@ swh::deploy::worker::swh_lister_github::config:
     args:
       db: "postgresql://%{hiera('swh::deploy::worker::swh_lister_github::db::user')}:%{hiera('swh::deploy::worker::swh_lister_github::db::password')}@%{hiera('swh::deploy::worker::swh_lister_github::db::host')}/%{hiera('swh::deploy::worker::swh_lister_github::db::dbname')}"
   # credentials in private data
+  celery:
+    task_broker: "%{alias('swh::deploy::scheduler::task_broker')}"
+    task_modules:
+      - swh.lister.github.tasks
+    task_queues:
+      - swh.lister.github.tasks.IncrementalGitHubLister
+      - swh.lister.github.tasks.RangeGitHubLister
+      - swh.lister.github.tasks.FullGitHubRelister
+      - swh_lister_github_discover
+      - swh_lister_github_refresh
 
 swh::deploy::worker::swh_lister_gitlab::concurrency: 1
 swh::deploy::worker::swh_lister_gitlab::loglevel: warning
diff --git a/site-modules/profile/manifests/swh/deploy/worker/swh_lister_github.pp b/site-modules/profile/manifests/swh/deploy/worker/swh_lister_github.pp
index c33fda293..696ffcf84 100644
--- a/site-modules/profile/manifests/swh/deploy/worker/swh_lister_github.pp
+++ b/site-modules/profile/manifests/swh/deploy/worker/swh_lister_github.pp
@@ -4,7 +4,7 @@ class profile::swh::deploy::worker::swh_lister_github {
   $loglevel = lookup('swh::deploy::worker::swh_lister_github::loglevel')
   $task_broker = lookup('swh::deploy::worker::swh_lister_github::task_broker')
 
-  $config_file = '/etc/softwareheritage/lister-github.com.yml'
+  $config_file = lookup('swh::deploy::worker::swh_lister_github::config_file')
   $config = lookup('swh::deploy::worker::swh_lister_github::config', Hash, 'deep')
 
   $task_modules = ['swh.lister.github.tasks']
@@ -12,7 +12,7 @@ class profile::swh::deploy::worker::swh_lister_github {
 
   include ::profile::swh::deploy::base_lister
 
-  ::profile::swh::deploy::worker::instance {'swh_lister_github':
+  ::profile::swh::deploy::worker::instance {'lister_github':
     ensure       => present,
     concurrency  => $concurrency,
     loglevel     => $loglevel,
-- 
GitLab