package com.github.k0kubun.github_ranking;

import com.github.k0kubun.github_ranking.config.Config;
import com.github.k0kubun.github_ranking.worker.UpdateUserWorker;
import com.github.k0kubun.github_ranking.worker.WorkerManager;
import javax.sql.DataSource;

public class Main
{
    public static void main(String[] args)
    {
        Config config = new Config(System.getenv());
        WorkerManager workers = buildWorkers(config);

        Runtime.getRuntime().addShutdownHook(new Thread(workers::stop));
        workers.start();
    }

    private static WorkerManager buildWorkers(Config config)
    {
        DataSource dataSource = config.getDatabaseConfig().getDataSource();

        WorkerManager workers = new WorkerManager();
        workers.add(new UpdateUserWorker(dataSource));
        return workers;
    }
}

@@ -272,16 +272,75 @@
  Main%0A%7B%0A
+    private static final int NUM_UPDATE_USER_WORKERS = 3;%0A%0A
     publ
@@ -786,24 +786,88 @@
 rManager();%0A
+        for (int i = 0; i %3C NUM_UPDATE_USER_WORKERS; i++) %7B%0A    
         work
@@ -905,24 +905,34 @@
 taSource));%0A
+        %7D%0A
         retu

Increase UpdateUserWorker: 1 -> 3