Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
whaleback
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
whaleback
Commits
e3e24717
Commit
e3e24717
authored
Nov 22, 2019
by
Ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete all chunk_file when they merged
parent
c1056400
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
chunk_file.rb
lib/whaleback/chunk_file.rb
+8
-1
No files found.
lib/whaleback/chunk_file.rb
View file @
e3e24717
...
...
@@ -58,7 +58,10 @@ module Whaleback
file
.
write
(
@file
&
.
read
)
end
finish_loading
merge_file
if
all_finish?
if
all_finish?
merge_file
all_suicide
end
end
def
merge_file
...
...
@@ -80,6 +83,10 @@ module Whaleback
)
end
def
all_suicide
ChunkFile
.
where
(
identifier:
identifier
).
destroy_all
end
# 可覆盖,Obj class 继承有 STI type 问题,也可以细化分类
def
assign_media_class
mime_type
case
mime_type
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment