Merge pull request #2277 from evazion/ugoira-fix-model
Fix frame data records being created for non-ugoira posts.
This commit is contained in:
@@ -10,7 +10,7 @@ class PixivUgoiraService
|
||||
end
|
||||
|
||||
def generate_resizes(source_path, output_path, preview_path)
|
||||
PixivUgoiraConverter.delay(:queue => Socket.gethostname).convert(source_path, output_path, preview_path, @frame_data)
|
||||
PixivUgoiraConverter.new.delay(:queue => Socket.gethostname).convert(source_path, output_path, preview_path, @frame_data)
|
||||
|
||||
# since the resizes will be delayed, just touch the output file so the
|
||||
# file distribution wont break
|
||||
|
||||
9
db/migrate/20141017231608_fix_pixiv_ugoira_frame_data.rb
Normal file
9
db/migrate/20141017231608_fix_pixiv_ugoira_frame_data.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class FixPixivUgoiraFrameData < ActiveRecord::Migration
|
||||
def change
|
||||
change_table :pixiv_ugoira_frame_data do |t|
|
||||
t.change :data, :text, :null => false
|
||||
t.change :content_type, :string, :null => false
|
||||
t.remove_timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2367,10 +2367,8 @@ ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
|
||||
CREATE TABLE pixiv_ugoira_frame_data (
|
||||
id integer NOT NULL,
|
||||
post_id integer,
|
||||
data text,
|
||||
content_type character varying(255),
|
||||
created_at timestamp without time zone,
|
||||
updated_at timestamp without time zone
|
||||
data text NOT NULL,
|
||||
content_type character varying(255) NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@@ -7119,3 +7117,5 @@ INSERT INTO schema_migrations (version) VALUES ('20140725003232');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20141009231234');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20141017231608');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user