 
 (defn- in-clause
   "Generates a sql in clause string. If there are more than the max values to put in the in clause
-  it creates multiple an ANDs them together."
+  it creates multiple an ORs them together."
   [field num-values]
   (let [num-full (int (/ num-values 1000))
         num-in-partial (mod num-values 1000)

        (sql-utils/query conn stmt)))

(defn- add-missing-items-to-work-table
  "Finds items that are missing in Metadata DB and adds it to the sync_work table."
  [system provider-id concept-type start-date end-date]
  (truncate-work-table system)
  (let [sql (format "insert into sync_work (id, concept_id)


(def WORK_ITEMS_BATCH_SIZE
  "The number of work items to fetch at a time from the work items table during processing"
  (config/config-value :db-sync-work-items-batch-size "1000" #(Long. ^String %)))

(def NUM_PROCESS_INSERT_THREADS
  "The number of concurrent threads that should process items for insert."
  (config/config-value :db-sync-num-insert-threads "5" #(Long. ^String %)))

(def NUM_PROCESS_DELETE_THREADS
  "The number of concurrent threads that should process deleting items"
  (config/config-value :db-sync-num-delete-threads "5" #(Long. ^String %)))

(comment

