Back to machines
Machine photo coming soon

Used LOADED-8931 Machine Tool

The publish script also has the same slow loading issue as the Moments download program: D:\Work\machine_china>python roc_scripts\publish_wechat_english_machines.py Loaded 8931 published image signature(s) from database. Loaded 5221 exact hashes and 8931 perceptual hashes for dedup check. Saturday 11:12 Processed 1 m 45 s Added local snapshot/incremental loading similar to Moments collection to the publish script. Now on first run it still pulls from database and generates:

Machine Code
OE260705
Year
On request
Location
China
Usage Hours
On request

Main Specifications

Slow loading issueD:\Work\machine_china>python roc_scripts\publish_wechat_english_machines.py Loaded 8931 published image signature(s) from database. Loaded 5221 exact hashes and 8931 perceptual hashes for dedup check. Saturday 11:12 Processed 1 m 45 s Added local snapshot/incremental loading similar to Moments collection to the publish script. Now on first run it pulls from database and generates:
Publish Script Loading Speed Issue And Local Snapshot MechanismSlow loading issue: D:\Work\machine_china>python roc_scripts\publish_wechat_english_machines.py Loaded 8931 published image signature(s) from database. Loaded 5221 exact hashes and 8931 perceptual hashes for dedup check. Sat 11:12 Processed 1 m 45 s Added local snapshot/incremental loading similar to Moments collection to the publish script. Now on first run it pulls from database and generates: resources/data/publish_image_signature_db_snapshot.json. On subsequent startups: if database unchanged: Loaded 8931 published image signature(s) from local database snapshot. If database has few new/update: Loaded 8950 published image signature(s) from local snapshot and 19 incremental update(s) from database. Only if snapshot missing.
Snapshot Writing And VerificationOnly writes the current in-memory signature index to local snapshot. Verification passed: py_compile, python -m unittest roc_scripts.tests.test_publish_wechat_english_machines. Edited publish_wechat_english_machines.py +83 -2. Sat 11:14 Why is Moments over 13000?
Difference In Loading Scope Between Publish And MomentsThis one is over 8000? Sat 11:14 Because the loading scopes differ. Moments collection loads global image signatures: published_machine + wechat_moment + local_audit, i.e., images from all sources are compared.
Design Intention For Loading ScopesSo you see over 13000. The publish script only loads published machine image signatures: published_machine, hence over 8000. This is intentional: in Moments collection stage: the sooner duplicates are found the better.
Audit Images And Publish Judging LogicAudit images are also compared. In publish stage: determine whether this machine has already been published.
Normal Count Difference And Image Dedup Saving In Moments ScriptBecause it might be the same machine not yet published. The counts you see now can be roughly understood as: Moments global dedup: about 13000+ entries; publish dedup: about 8000+ entries from published_machine. This difference is normal. Sat 11:14 wechat_moments_semi_auto.py save image dedup.
Folder Naming Change And Duplicate Image HandlingDirectly name folders like machine_260712_0737_01. 7:22 Processed 3 m 4 s. Modified wechat_moments_semi_auto.py. Now: if duplicate image found in same folder: delete current image.
Different Duplicate Handling Per Folder TypeContinue saving next one. If duplicate with historical folder: still stop current moment.
Purpose Of Folder Naming And Existence HandlingAvoid entire duplicate data. Folder naming changed to: machine_260712_0737_01. If directory already exists.
Avoid Overwriting Old Data And Test RunAvoid overwriting old data. Passed syntax check and directory naming validation. Edited wechat_moments_semi_auto.py +26 -3. 7:25 D:\Work\machine_china>python roc_scripts\wechat\wechat_moments_semi_auto.py --phone Detected historical config.
Reuse Config PromptDefault y): y Enable step-by-step confirmation mode for this run? (y/n
Confirmation Mode Prompt (continued)Default use existing config): n Enable debug log for this run? (y/n
Debug Log Prompt And Error Traceback StartDefault use existing config): n Loaded 14450 image signature(s) from local database snapshot for global duplicate checks. Traceback (most recent call last): File "D:\Work\machine_china\roc_scripts\wechat\wechat_moments_semi_auto.py"
Error Line Number 758line 758
Error FrameMain() Call: in <module> main() File "D:\Work\machine_china\roc_scripts\wechat\wechat_moments_semi_auto.py"
Error Line Number 689line 689
Error FrameSignature_cache.refresh(): in main cache_stats = signature_cache.refresh() File "D:\Work\machine_china\roc_scripts\wechat\wechat_moments_semi_auto.py"
Error Line Number 269line 269
Error Frame_sync_path_to_database: signature) File "D:\Work\machine_china\roc_scripts\wechat\wechat_moments_semi_auto.py"
Error Line Number 242line 242
Error FrameUpsert_image_signature Call: in _sync_path_to_database upsert_image_signature( File "D:\Work\machine_china\roc_scripts\image_signature_store.py"
Error Line Number 90line 90
Error FrameUpdate_or_create Call: in upsert_image_signature DbImageSignature.objects.update_or_create( File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\models\manager.py"
Error Line Number 87line 87
Error FrameKwargs Argument: x x kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\models\query.py"
Error Line Number 946line 946
Error FrameTransaction.atomic: in update_or_create with transaction.atomic(using=self.db): File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\transaction.py"
Error Line Number 216line 216
Error FrameSet_autocommit: in enter connection.set_autocommit( File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\backends\base\base.py"
Error Line Number 497line 497
Error Frame_set_autocommit: in set_autocommit self._set_autocommit(autocommit) File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\backends\mysql\base.py"
Error Line Number 289line 289
Error FrameConnection.autocommit: in _set_autocommit self.connection.autocommit(autocommit) File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py"
Error Line Number 447line 447
Error Frame_send_autocommit_mode: in autocommit self._send_autocommit_mode() File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py"
Error Line Number 468line 468
Error Frame_read_ok_packet: in _send_autocommit_mode self._read_ok_packet() File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py"
Error Line Number 453line 453
Error Frame_read_packet: in _read_ok_packet pkt = self._read_packet() File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py"
Error Line Number 744line 744
Error Frame_read_bytes: in _read_packet packet_header = self._read_bytes(4) File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py"
Error Line Number 782line 782
Error FrameSocket Read: in _read_bytes data = self._rfile.read(num_bytes) File "C:\Program Files\Python 310\lib\socket.py"
Error Line Number 705line 705
Keyboardinterrupt And Command Errorin readinto return self._sock.recv_into(b) KeyboardInterrupt ^C D:\Work\machine_china>7 '7' is not an internal or external command
Error Message And Subsequent Runnor a runnable program or batch file. D:\Work\machine_china> D:\Work\machine_china> D:\Work\machine_china>python roc_scripts\wechat\wechat_moments_semi_auto.py --phone Detected historical config.
Run Output With Incremental UpdatesDefault use existing config): n Loaded 14679 image signature(s) from local snapshot and 229 incremental update(s) from database. WeChat Moments download
Slow Download Timeexceeded 1 minute
Optimization Completion And Root CauseHow to make it faster? Show more 7:47 Processed 3 m 23 s Optimization completed. The root cause of slowness is indeed cache merging error
Optimization DetailsCache And Fingerprint Handling: not simply because of 14 k data entries. Previously on startup: server snapshot overwrites local cache for current phone number. Recalculate existing image fingerprints. Write each image individually to server database. Each phone number's JSON also repeatedly saves all server fingerprints. Now changed: phone number cache only saves local file state for that number. Global server fingerprints only keep one snapshot. Images already in database directly reuse fingerprints
Batch Write And Automatic Cleanupdo not re-upload. Truly missing fingerprints are batch written to database once. Old cache will be automatically cleaned after this run. The 229 incremental update(s) you saw.
Meaning Of Incremental Updatesare the 229 images already written one by one to the database before the first interruption.
Command To Continue And Expected BehaviorNot data anomaly. Continue using the original command: python roc_scripts\wechat\wechat_moments_semi_auto.py --phone This time it should recognize the existing 229 images as reused.
Test Pass And File Edit SummaryWill not upload individually again. Syntax check and 7 related tests passed. Edited 2 files +132 -38: roc_scripts/image_signature_store.py +56 -0; roc_scripts/wechat/wechat_moments_semi_auto.py +76 -38. 7:51 Environment info changes +573 -1
Git Status And Source Files767 local master commit or push GitHub CLI not authenticated Source wechat_moments_semi_auto.py publish_wechat_english_machines.py View all

Related inventory

More Other Equipment machines

View category