Skip to content

jsanchesleao/batchloop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

batchloop

Minimalistic library to asynchronously process files line by line

Usage

[batchloop "1.0.0"]

(ns my.ns
  (:require [batchloop.core :as b]))

(b/process :path    "myfile.txt"
           :timeout 300        ;; pass a timeout (in ms) for each line processing
           :buffer  10         ;; how many lines to buffer in memory

                       ;;   The action to be performed receives three arguments.
                       ;;   You need to explicitly call (success!) OR (failure!)
                       ;; to indicate that the line has been processed, otherwise
                       ;; batchloop will consider it finished when the timeout
                       ;; explodes.
           :action (fn [line success! failure!]
                     (println line)
                     (success!)))

About

Minimalistic library to asynchronously process files line by line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published