Staticsync in 10.7 rescans importfolders on every scan

10 views
Skip to first unread message

Trond Helge Rolland

unread,
2:53 AM (21 hours ago) 2:53 AM
to ResourceSpace
Have anybody else this experience when upgrading to 10.7 (from 10.6) where StaticSync takes a much longer time, if checking processes I see every image is being run through exiftool (we don't ingest) each time staticsync is run. 

We used to have a 5 minute poller which worked fine, but now each run takes close to 60 minutes (not to mention the cpu resources), I can't find any reason for this to have changed in 10.7, nothing referred to in the documentation or default config. 

Trond Helge Rolland

unread,
3:26 AM (20 hours ago) 3:26 AM
to ResourceSpace
Verifying the exiftool command, it appears that now staticsync triggers a mimetype call (exiftool -s - s- -s -t -mimetye $image) on each and every image in the importfolders (in our case there are probably 50k there, they've all been imported fine during the previous years). 

It does not appear that staticsync is actually updating any information in the database, so something triggers this command on each and every run. (We need exiftool to fetch metadata for the images like date taken, so we can't disable metadata completely). 

Trond Helge Rolland

unread,
9:19 AM (14 hours ago) 9:19 AM
to ResourceSpace
2nd update after a lot of digging through the code, it appears StaticSync does a "dry run" on all files prior to actually checking if they're already imported, which to me seems very troublesome, and the dry run uses the process_file_upload function which in turn does a lot of extension and mimetype checking. Still haven't found why this triggers after upgrading though

 // Verify if the file would actually pass the upload checks to prevent any unnecessary processing (e.g. collections)
            $dry_run_process_file_upload = process_file_upload(
                new SplFileInfo($fullpath),
                new SplFileInfo(get_temp_dir(false) . '/staticsync/' . generateSecureKey(16) . '.bin'),
                ['file_move' => 'dry_run']
            );
            if (!$dry_run_process_file_upload['success']) {
                printf(
                    ' * Skipping file - %s: %s%s',
                    $fullpath,
                    $dry_run_process_file_upload['error']->i18n($lang),
                    PHP_EOL
                );
                continue;
            }

Reply all
Reply to author
Forward
0 new messages