🐛 Fix analyzer didn't cache attachment
This commit is contained in:
parent
479b1933b0
commit
1e4d7985ea
10
.idea/workspace.xml
generated
10
.idea/workspace.xml
generated
@ -4,11 +4,7 @@
|
||||
<option name="autoReloadType" value="ALL" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="18dd0d68-b4b8-40db-9734-9119b5c848bd" name="更改" comment=":sparkles: Make it more implementable">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/server/api/up_multipart_api.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/server/api/up_multipart_api.go" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pkg/internal/services/merger.go" beforeDir="false" afterPath="$PROJECT_DIR$/pkg/internal/services/merger.go" afterDir="false" />
|
||||
</list>
|
||||
<list default="true" id="18dd0d68-b4b8-40db-9734-9119b5c848bd" name="更改" comment=":bug: Fix merged file isn't add to cache" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@ -118,7 +114,6 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value=" :sparkles: Add health check" />
|
||||
<MESSAGE value=":arrow_up: Upgrade Passport and use Hyper SDK" />
|
||||
<MESSAGE value=":arrow_up: Upgrade Passport to fix bug" />
|
||||
<MESSAGE value=":ambulance: Fix getting user panic" />
|
||||
@ -143,7 +138,8 @@
|
||||
<MESSAGE value=":sparkles: Un-public indexable & select by pools" />
|
||||
<MESSAGE value=":sparkles: Multipart file upload" />
|
||||
<MESSAGE value=":sparkles: Make it more implementable" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value=":sparkles: Make it more implementable" />
|
||||
<MESSAGE value=":bug: Fix merged file isn't add to cache" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value=":bug: Fix merged file isn't add to cache" />
|
||||
</component>
|
||||
<component name="VgoProject">
|
||||
<settings-migrated>true</settings-migrated>
|
||||
|
@ -181,7 +181,7 @@ func AnalyzeAttachment(file models.Attachment) error {
|
||||
if linked && err != nil {
|
||||
return fmt.Errorf("unable to link file record: %v", err)
|
||||
} else if !linked {
|
||||
metadataCache.Store(file.ID, file)
|
||||
CacheAttachment(file)
|
||||
if err := tx.Save(&file).Error; err != nil {
|
||||
tx.Rollback()
|
||||
return fmt.Errorf("unable to save file record: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user