private void updateFsJob ( String jobName , LocalDateTime scanDate ) throws Exception { // We need to round that latest date to the lower second and // remove 2 seconds. // See #82: https://github.com/dadoonet/fscrawler/issues/82 scanDate = scanDate . minus ( 2 , ChronoUnit . SECONDS ) ; FsJob fsJob = FsJob . builder ( ) . setName ( jobName ) . setLastrun ( scanDate ) . setIndexed ( stats . getNbDocScan ( ) ) . setDeleted ( stats . getNbDocDeleted ( ) ) . build ( ) ; fsJobFileHandler . write ( jobName , fsJob ) ; }
Update the job metadata