fist dedup implementation
[cloudstore.git] / rsync-piper.pl
index 12e1e79..ea87cef 100755 (executable)
@@ -12,6 +12,7 @@ use English;
 
 use lib 'lib';
 use CloudStore::JSON;
+use CloudStore::dedup;
 
 my $dir   = $ENV{RSYNC_DIR}  || '/srv/cloudstore';
 my $port  = $ENV{RSYNC_PORT} || 6501;
@@ -166,6 +167,8 @@ while(1) {
 
                        print ">>> data ",dump( \%data ) if $ENV{DEBUG};
 
+                       CloudStore::dedup::data \%data;
+
                        my $json = CloudStore::JSON::rsync_transfer \%data;
 
                        $gearman->dispatch_background( 'rsync_transfer' => $json );