zencodable 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +18 -10
- data/lib/generators/zencodable/migration_generator.rb +1 -5
- data/lib/generators/zencodable/templates/zencodable_add_tracking_columns_and_tables.rb +33 -0
- data/lib/zencodable/version.rb +1 -1
- data/test/debug.log +354 -0
- data/test/dummy/tmp/db/migrate/{20111202214515_create_encoded_kitteh_vids.rb → 20111205192243_zencodable_add_tracking_columns_and_tables.rb} +8 -1
- data/test/zencodable_generators_test.rb +5 -10
- metadata +6 -10
- data/lib/generators/zencodable/templates/add_zencoder_job_tracking_columns.rb +0 -8
- data/lib/generators/zencodable/templates/create_association_table.rb +0 -17
- data/lib/generators/zencodable/templates/create_association_thumbnails_table.rb +0 -12
- data/test/dummy/tmp/db/migrate/20111202214515_add_zencoder_job_tracking_columns_to_kitteh_movies.rb +0 -8
data/README.md
CHANGED
@@ -26,13 +26,15 @@ _developed on ruby 1.9.2-p290 and Rails 3.1.3_
|
|
26
26
|
3. this gem (zencodable) in your gemfile, and typhoeus.
|
27
27
|
|
28
28
|
gem 'zencodable'
|
29
|
-
gem 'typhoeus'
|
29
|
+
gem 'typhoeus' # NOTE: for heroku deploys, pin to 0.2.4 https://github.com/dbalatero/typhoeus/issues/123
|
30
30
|
|
31
31
|
# Setup
|
32
32
|
|
33
|
-
## Zencoder API keys
|
33
|
+
## Zencoder API keys and initializer settings
|
34
34
|
|
35
|
-
the zencoder/zencoder-rb gem expects access to your Zencoder API keys in some fashion. Also,
|
35
|
+
the [zencoder](https://github.com/zencoder/zencoder-rb) gem expects access to your Zencoder API keys in some fashion. Also, [typhoeus](https://github.com/dbalatero/typhoeus) is a big improvement for HTTP stuffs. Thirdly, Zencoder's API v2 (soon to be released as of 2011-12-4) is full of options, has more progress information and much more hotness - so let's use that!.
|
36
|
+
|
37
|
+
So, I like something in `config/initializers/zencoder.rb` like
|
36
38
|
|
37
39
|
# zencoder setup
|
38
40
|
if Rails.env == 'production'
|
@@ -43,6 +45,8 @@ the zencoder/zencoder-rb gem expects access to your Zencoder API keys in some fa
|
|
43
45
|
|
44
46
|
Zencoder::HTTP.http_backend = Zencoder::HTTP::Typhoeus
|
45
47
|
|
48
|
+
Zencoder.base_url = 'https://app.zencoder.com/api/v2'
|
49
|
+
|
46
50
|
## Bucket policy
|
47
51
|
|
48
52
|
The bucket needs to have a custom policy to allow Zencoder to place the output videos on it. [Here is a guide on Zencoder's site, follow it](https://app.zencoder.com/docs/guides/getting-started/working-with-s3)
|
@@ -71,7 +75,7 @@ add something like the above `has_video_encodings` class method to your model (t
|
|
71
75
|
|
72
76
|
The options should include a `:s3_config` key that gives a location of a YAML file containing your S3 credentials, which should contain a 'bucket' key (you already have one, right?) Actually, all we need from that is the bucket name, so you can instead use a `:bucket` key to give the name of the bucket where the output files should be placed.
|
73
77
|
|
74
|
-
The `:path` option can be any path within that bucket. It can contain a `:basename` token, which will be replaced with a sanitized, URL-encoded version of the original filename as uploaded.
|
78
|
+
The `:path` option can be any path within that bucket. It can contain a `:basename` token, which will be replaced with a sanitized, URL-encoded version of the original filename as uploaded.
|
75
79
|
|
76
80
|
`:formats` is a list of output formats you'd like. [Supported formats and codecs](https://app.zencoder.com/docs/api/encoding/format-and-codecs/format)
|
77
81
|
|
@@ -79,7 +83,7 @@ The other options are all those that can be handled by Zencoder. More info can b
|
|
79
83
|
|
80
84
|
### Give it a source URL
|
81
85
|
|
82
|
-
All that's needed to trigger the Zencoder job is to change the `origin_url` value of your model, and then save. That will be picked up, sent to Zencoder, and your job will be started with your desired settings.
|
86
|
+
All that's needed to trigger the Zencoder job is to change the `origin_url` value of your model, and then save. That will be picked up, sent to Zencoder, and your job will be started with your desired settings.
|
83
87
|
|
84
88
|
As the job runs, you can check `Model.job_status` as you see fit, if the job is neither failed nor finished, it will request an update from Zencoder for that Job.
|
85
89
|
|
@@ -89,22 +93,26 @@ Individual files will complete at different times, so you can also check the `st
|
|
89
93
|
vid.origin_url = 'http://sourcebucket.s3.amazonaws.com/largevideos/funny_kittehs[HD].mov'
|
90
94
|
vid.save
|
91
95
|
vid.job_status # "new"
|
92
|
-
...
|
96
|
+
...
|
93
97
|
vid.job_status # "waiting"
|
94
|
-
...
|
98
|
+
...
|
95
99
|
vid.job_status # "processing"
|
96
100
|
vid.video_encoded_files.collect { |v| [v.format, v.state] }
|
97
|
-
...
|
101
|
+
...
|
98
102
|
vid.job_status # "finished"
|
99
103
|
vid.video_encoded_files.size # 4
|
100
104
|
vid.video_encoded_file_thumbnails.size # 2
|
101
|
-
|
105
|
+
|
102
106
|
|
103
107
|
## TODO
|
104
108
|
|
105
|
-
* change name of `origin_url` column and make sure its added in the migrations
|
106
109
|
* rake task to generate a working bucket policy (even if it has to be pasted in)
|
110
|
+
* set timeouts on update_job
|
111
|
+
* create DJ and/or Resque workers to handle job submission (should be optional dependencies though)
|
112
|
+
* generator to install config/initializer
|
113
|
+
* remove files from S3 when object is deleted
|
107
114
|
* background jobs to update the ZC job progress, with events/notifications
|
115
|
+
* use API v2 features to get more interesting info on job progress
|
108
116
|
* is s3_url basename sanitization going to be good for non-ASCII filenames? no.
|
109
117
|
|
110
118
|
## License
|
@@ -24,11 +24,7 @@ module Zencodable
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def create_migration_files
|
27
|
-
migration_template '
|
28
|
-
migration_template 'create_association_table.rb', "db/migrate/create_#{association_name}"
|
29
|
-
unless options.skip_thumbnails?
|
30
|
-
migration_template 'create_association_thumbnails_table.rb', "db/migrate/create_#{association_name}_thumbnails"
|
31
|
-
end
|
27
|
+
migration_template 'zencodable_add_tracking_columns_and_tables.rb', "db/migrate/zencodable_add_tracking_columns_and_tables"
|
32
28
|
end
|
33
29
|
|
34
30
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class AddZencoderJobTrackingColumns < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
add_column :<%= name.tableize %>, :origin_url, :string
|
4
|
+
add_column :<%= name.tableize %>, :zencoder_job_status, :string
|
5
|
+
add_column :<%= name.tableize %>, :zencoder_job_created, :datetime
|
6
|
+
add_column :<%= name.tableize %>, :zencoder_job_finished, :datetime
|
7
|
+
|
8
|
+
create_table "<%= association_name %>" do |t|
|
9
|
+
t.string "url"
|
10
|
+
t.string "format"
|
11
|
+
t.integer "zencoder_file_id"
|
12
|
+
t.integer "<%= name.foreign_key %>"
|
13
|
+
t.datetime "created_at"
|
14
|
+
t.integer "width"
|
15
|
+
t.integer "height"
|
16
|
+
t.integer "file_size"
|
17
|
+
t.string "error_message"
|
18
|
+
t.string "state"
|
19
|
+
t.timestamps
|
20
|
+
end
|
21
|
+
|
22
|
+
<% if !options.skip_thumbnails %>
|
23
|
+
create_table "<%= association_name.singularize %>_thumbnails" do |t|
|
24
|
+
t.string "thumbnail_file_name"
|
25
|
+
t.string "thumbnail_content_type"
|
26
|
+
t.integer "thumbnail_file_size"
|
27
|
+
t.datetime "thumbnail_updated_at"
|
28
|
+
t.integer "<%= name.foreign_key %>"
|
29
|
+
t.timestamps
|
30
|
+
end
|
31
|
+
<% end %>
|
32
|
+
end
|
33
|
+
end
|
data/lib/zencodable/version.rb
CHANGED
data/test/debug.log
CHANGED
@@ -901,3 +901,357 @@ Unfinished job found. Updating details.
|
|
901
901
|
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
902
902
|
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-02 21:23:00.609743' WHERE "videos"."id" = 1[0m
|
903
903
|
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
904
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
905
|
+
[1m[35mSQL (17.2ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
906
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
907
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
908
|
+
Origin URL changed. Creating new ZenCoder job.
|
909
|
+
ZenCoder job created, ID = 123
|
910
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-02 21:47:37.303304', "updated_at" = '2011-12-02 21:47:37.303528' WHERE "videos"."id" = 1[0m
|
911
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
912
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
913
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
|
914
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
915
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
916
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
917
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
918
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
919
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
|
920
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
921
|
+
[1m[35mVideoFile Load (0.2ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
|
922
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
923
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
|
924
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
925
|
+
Unfinished job found. Updating details.
|
926
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
927
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
928
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
929
|
+
[1m[36mVideoFileThumbnail Load (0.1ms)[0m [1mSELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1[0m
|
930
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
931
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
932
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
933
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-02 21:47:37.468334' WHERE "videos"."id" = 1[0m
|
934
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
935
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
936
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
937
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
938
|
+
Unfinished job found. Updating details.
|
939
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
940
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
941
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
|
942
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
943
|
+
[1m[35mVideoFileThumbnail Load (0.1ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
944
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
945
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
946
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
947
|
+
[1m[35m (0.2ms)[0m UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-02 21:47:37.481324' WHERE "videos"."id" = 1
|
948
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
949
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
950
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
951
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
952
|
+
Unfinished job found. Updating details.
|
953
|
+
[1m[36mVideoFile Load (0.1ms)[0m [1mSELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1[0m
|
954
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
955
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
956
|
+
[1m[35mVideoFileThumbnail Load (0.2ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
957
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
958
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Fri, 02 Dec 2011 21:47:37 UTC +00:00], ["video_id", 1]]
|
959
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
960
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
961
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-02 21:47:37.502119' WHERE "videos"."id" = 1[0m
|
962
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
963
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
964
|
+
[1m[35mSQL (47.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
965
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
966
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
967
|
+
Origin URL changed. Creating new ZenCoder job.
|
968
|
+
ZenCoder job created, ID = 123
|
969
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-02 21:48:06.791811', "updated_at" = '2011-12-02 21:48:06.792022' WHERE "videos"."id" = 1[0m
|
970
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
971
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
972
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
|
973
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
974
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
975
|
+
[1m[36mSQL (1.2ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
976
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
977
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
978
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
|
979
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
980
|
+
[1m[35mVideoFile Load (0.2ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
|
981
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
982
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
|
983
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
984
|
+
Unfinished job found. Updating details.
|
985
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
986
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
987
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
988
|
+
[1m[36mVideoFileThumbnail Load (0.1ms)[0m [1mSELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1[0m
|
989
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
990
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
991
|
+
[1m[35m (0.4ms)[0m SAVEPOINT active_record_1
|
992
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-02 21:48:06.995664' WHERE "videos"."id" = 1[0m
|
993
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
994
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
995
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:48:06 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
996
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
997
|
+
Unfinished job found. Updating details.
|
998
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
999
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1000
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:48:07 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Fri, 02 Dec 2011 21:48:07 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
|
1001
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1002
|
+
[1m[35mVideoFileThumbnail Load (0.1ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1003
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1004
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1005
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1006
|
+
[1m[35m (0.3ms)[0m UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-02 21:48:07.006681' WHERE "videos"."id" = 1
|
1007
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1008
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1009
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Fri, 02 Dec 2011 21:48:07 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Fri, 02 Dec 2011 21:48:07 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1010
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1011
|
+
Unfinished job found. Updating details.
|
1012
|
+
[1m[36mVideoFile Load (0.1ms)[0m [1mSELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1[0m
|
1013
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1014
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1015
|
+
[1m[35mVideoFileThumbnail Load (0.2ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1016
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1017
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 21:48:07 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Fri, 02 Dec 2011 21:48:07 UTC +00:00], ["video_id", 1]]
|
1018
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1019
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1020
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-02 21:48:07.027814' WHERE "videos"."id" = 1[0m
|
1021
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1022
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1023
|
+
[1m[35mSQL (74.1ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
1024
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1025
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1026
|
+
Origin URL changed. Creating new ZenCoder job.
|
1027
|
+
ZenCoder job created, ID = 123
|
1028
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-05 19:17:23.313278', "updated_at" = '2011-12-05 19:17:23.313506' WHERE "videos"."id" = 1[0m
|
1029
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1030
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1031
|
+
[1m[35mSQL (2.4ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
|
1032
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1033
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1034
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
1035
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1036
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1037
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
|
1038
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1039
|
+
[1m[35mVideoFile Load (0.2ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
|
1040
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1041
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
|
1042
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1043
|
+
Unfinished job found. Updating details.
|
1044
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
1045
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1046
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1047
|
+
[1m[36mVideoFileThumbnail Load (0.1ms)[0m [1mSELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1[0m
|
1048
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1049
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1050
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1051
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-05 19:17:23.517874' WHERE "videos"."id" = 1[0m
|
1052
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1053
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1054
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1055
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1056
|
+
Unfinished job found. Updating details.
|
1057
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
1058
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1059
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
|
1060
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1061
|
+
[1m[35mVideoFileThumbnail Load (0.1ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1062
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1063
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1064
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1065
|
+
[1m[35m (0.1ms)[0m UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-05 19:17:23.536124' WHERE "videos"."id" = 1
|
1066
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1067
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1068
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1069
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1070
|
+
Unfinished job found. Updating details.
|
1071
|
+
[1m[36mVideoFile Load (0.2ms)[0m [1mSELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1[0m
|
1072
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1073
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1074
|
+
[1m[35mVideoFileThumbnail Load (0.2ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1075
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1076
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Mon, 05 Dec 2011 19:17:23 UTC +00:00], ["video_id", 1]]
|
1077
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1078
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1079
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-05 19:17:23.603967' WHERE "videos"."id" = 1[0m
|
1080
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1081
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1082
|
+
[1m[35mSQL (22.2ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
1083
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1084
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1085
|
+
Origin URL changed. Creating new ZenCoder job.
|
1086
|
+
ZenCoder job created, ID = 123
|
1087
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-05 19:19:54.743676', "updated_at" = '2011-12-05 19:19:54.743899' WHERE "videos"."id" = 1[0m
|
1088
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1089
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1090
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
|
1091
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1092
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1093
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
1094
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1095
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1096
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
|
1097
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1098
|
+
[1m[35mVideoFile Load (0.2ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
|
1099
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1100
|
+
[1m[35mSQL (1.6ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
|
1101
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1102
|
+
Unfinished job found. Updating details.
|
1103
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
1104
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1105
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1106
|
+
[1m[36mVideoFileThumbnail Load (0.1ms)[0m [1mSELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1[0m
|
1107
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1108
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1109
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1110
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-05 19:19:54.961043' WHERE "videos"."id" = 1[0m
|
1111
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1112
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1113
|
+
[1m[35mSQL (1.4ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1114
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1115
|
+
Unfinished job found. Updating details.
|
1116
|
+
[1m[35mVideoFile Load (0.3ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
1117
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1118
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
|
1119
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1120
|
+
[1m[35mVideoFileThumbnail Load (0.1ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1121
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1122
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1123
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1124
|
+
[1m[35m (0.1ms)[0m UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-05 19:19:54.978432' WHERE "videos"."id" = 1
|
1125
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1126
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1127
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1128
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1129
|
+
Unfinished job found. Updating details.
|
1130
|
+
[1m[36mVideoFile Load (0.1ms)[0m [1mSELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1[0m
|
1131
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1132
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1133
|
+
[1m[35mVideoFileThumbnail Load (0.2ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1134
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1135
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Mon, 05 Dec 2011 19:19:54 UTC +00:00], ["video_id", 1]]
|
1136
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1137
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1138
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-05 19:19:55.000816' WHERE "videos"."id" = 1[0m
|
1139
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1140
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1141
|
+
[1m[35mSQL (21.6ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:10 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:10 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
1142
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1143
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1144
|
+
Origin URL changed. Creating new ZenCoder job.
|
1145
|
+
ZenCoder job created, ID = 123
|
1146
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-05 19:22:10.914862', "updated_at" = '2011-12-05 19:22:10.915089' WHERE "videos"."id" = 1[0m
|
1147
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1148
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1149
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:10 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:10 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
|
1150
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1151
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1152
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 05 Dec 2011 19:22:10 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:10 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
1153
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1154
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1155
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
|
1156
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1157
|
+
[1m[35mVideoFile Load (0.4ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
|
1158
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1159
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
|
1160
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1161
|
+
Unfinished job found. Updating details.
|
1162
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
1163
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1164
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1165
|
+
[1m[36mVideoFileThumbnail Load (0.2ms)[0m [1mSELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1[0m
|
1166
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1167
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1168
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1169
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-05 19:22:11.107726' WHERE "videos"."id" = 1[0m
|
1170
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1171
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1172
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1173
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1174
|
+
Unfinished job found. Updating details.
|
1175
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
1176
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1177
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
|
1178
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1179
|
+
[1m[35mVideoFileThumbnail Load (0.1ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1180
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1181
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1182
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1183
|
+
[1m[35m (0.2ms)[0m UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-05 19:22:11.120747' WHERE "videos"."id" = 1
|
1184
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1185
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1186
|
+
[1m[36mSQL (1.5ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1187
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1188
|
+
Unfinished job found. Updating details.
|
1189
|
+
[1m[36mVideoFile Load (0.1ms)[0m [1mSELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1[0m
|
1190
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1191
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1192
|
+
[1m[35mVideoFileThumbnail Load (0.2ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1193
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1194
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Mon, 05 Dec 2011 19:22:11 UTC +00:00], ["video_id", 1]]
|
1195
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1196
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1197
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-05 19:22:11.143948' WHERE "videos"."id" = 1[0m
|
1198
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1199
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1200
|
+
[1m[35mSQL (18.7ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:42 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:42 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
1201
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1202
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1203
|
+
Origin URL changed. Creating new ZenCoder job.
|
1204
|
+
ZenCoder job created, ID = 123
|
1205
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "origin_url" = 'http://foo.com/1/2/4', "zencoder_job_id" = '123', "zencoder_job_status" = 'new', "zencoder_job_created" = '2011-12-05 19:22:42.870261', "updated_at" = '2011-12-05 19:22:42.870534' WHERE "videos"."id" = 1[0m
|
1206
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1207
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1208
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:42 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:42 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "finished"]]
|
1209
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1210
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1211
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 05 Dec 2011 19:22:42 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:42 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", nil]]
|
1212
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1213
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1214
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:42 UTC +00:00], ["duration_sec", 120], ["error_message", nil], ["file_size", 19293819], ["format", "webm"], ["height", 600], ["state", "finished"], ["updated_at", Mon, 05 Dec 2011 19:22:42 UTC +00:00], ["url", "http://parallaxp.s3.amazonaws.com/videos/zc/video-title/file.1.off"], ["video_id", 1], ["width", 800], ["zencoder_file_id", 12345329]]
|
1215
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1216
|
+
[1m[35mVideoFile Load (0.2ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1 AND "video_files"."format" = 'webm' LIMIT 1
|
1217
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1218
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "new"]]
|
1219
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1220
|
+
Unfinished job found. Updating details.
|
1221
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
1222
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1223
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1224
|
+
[1m[36mVideoFileThumbnail Load (0.2ms)[0m [1mSELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1[0m
|
1225
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1226
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1227
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1228
|
+
[1m[36m (0.2ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'makin progress', "updated_at" = '2011-12-05 19:22:43.070084' WHERE "videos"."id" = 1[0m
|
1229
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1230
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
1231
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1232
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1233
|
+
Unfinished job found. Updating details.
|
1234
|
+
[1m[35mVideoFile Load (0.1ms)[0m SELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1
|
1235
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1236
|
+
[1m[35mSQL (1.0ms)[0m INSERT INTO "video_files" ("created_at", "duration_sec", "error_message", "file_size", "format", "height", "state", "updated_at", "url", "video_id", "width", "zencoder_file_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["duration_sec", nil], ["error_message", nil], ["file_size", nil], ["format", "flv"], ["height", nil], ["state", nil], ["updated_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["url", "http://s3.com/6/7/8.flv"], ["video_id", 1], ["width", nil], ["zencoder_file_id", nil]]
|
1237
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1238
|
+
[1m[35mVideoFileThumbnail Load (0.1ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1239
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1240
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
1241
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1242
|
+
[1m[35m (0.2ms)[0m UPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-05 19:22:43.083887' WHERE "videos"."id" = 1
|
1243
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1244
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
1245
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "videos" ("created_at", "origin_url", "title", "updated_at", "zencoder_job_created", "zencoder_job_finished", "zencoder_job_id", "zencoder_job_status") VALUES (?, ?, ?, ?, ?, ?, ?, ?)[0m [["created_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["origin_url", nil], ["title", "At the Foo Bar"], ["updated_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["zencoder_job_created", nil], ["zencoder_job_finished", nil], ["zencoder_job_id", nil], ["zencoder_job_status", "processing"]]
|
1246
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
1247
|
+
Unfinished job found. Updating details.
|
1248
|
+
[1m[36mVideoFile Load (0.1ms)[0m [1mSELECT "video_files".* FROM "video_files" WHERE "video_files"."video_id" = 1[0m
|
1249
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1250
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1251
|
+
[1m[35mVideoFileThumbnail Load (0.1ms)[0m SELECT "video_file_thumbnails".* FROM "video_file_thumbnails" WHERE "video_file_thumbnails"."video_id" = 1
|
1252
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
1253
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "video_file_thumbnails" ("created_at", "thumbnail_content_type", "thumbnail_file_name", "thumbnail_file_size", "thumbnail_updated_at", "updated_at", "video_id") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["thumbnail_content_type", "png"], ["thumbnail_file_name", "http://s3.com/1/2/3.png"], ["thumbnail_file_size", nil], ["thumbnail_updated_at", nil], ["updated_at", Mon, 05 Dec 2011 19:22:43 UTC +00:00], ["video_id", 1]]
|
1254
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
1255
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
1256
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "videos" SET "zencoder_job_status" = 'finished', "updated_at" = '2011-12-05 19:22:43.113256' WHERE "videos"."id" = 1[0m
|
1257
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
@@ -1,5 +1,10 @@
|
|
1
|
-
class
|
1
|
+
class AddZencoderJobTrackingColumns < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
+
add_column :kitteh_movies, :origin_url, :string
|
4
|
+
add_column :kitteh_movies, :zencoder_job_status, :string
|
5
|
+
add_column :kitteh_movies, :zencoder_job_created, :datetime
|
6
|
+
add_column :kitteh_movies, :zencoder_job_finished, :datetime
|
7
|
+
|
3
8
|
create_table "encoded_kitteh_vids" do |t|
|
4
9
|
t.string "url"
|
5
10
|
t.string "format"
|
@@ -13,5 +18,7 @@ class CreateZencodableOutputFilesAssociationTable < ActiveRecord::Migration
|
|
13
18
|
t.string "state"
|
14
19
|
t.timestamps
|
15
20
|
end
|
21
|
+
|
22
|
+
|
16
23
|
end
|
17
24
|
end
|
@@ -9,19 +9,13 @@ class ZencodableGeneratorTest < Rails::Generators::TestCase
|
|
9
9
|
|
10
10
|
test "creates a migration for the output files model" do
|
11
11
|
run_generator %w(KittehMovie encoded_kitteh_vids)
|
12
|
-
assert_migration "db/migrate/
|
12
|
+
assert_migration "db/migrate/zencodable_add_tracking_columns_and_tables.rb" do |migration|
|
13
13
|
assert_match /create_table "encoded_kitteh_vids"/, migration
|
14
14
|
assert_match /t\.integer\s+\"kitteh_movie_id\"/, migration
|
15
|
-
|
16
|
-
assert_migration "db/migrate/create_encoded_kitteh_vids_thumbnails.rb" do |migration|
|
15
|
+
|
17
16
|
assert_match /create_table "encoded_kitteh_vid_thumbnails"/, migration
|
18
17
|
assert_match /t\.integer\s+\"kitteh_movie_id\"/, migration
|
19
|
-
end
|
20
|
-
end
|
21
18
|
|
22
|
-
test "creates a migration to add job tracking columns to the named model" do
|
23
|
-
run_generator %w(KittehMovie encoded_kitteh_vids)
|
24
|
-
assert_migration "db/migrate/add_zencoder_job_tracking_columns_to_kitteh_movies.rb" do |migration|
|
25
19
|
assert_match /add_column :kitteh_movies, :origin_url, :string/, migration
|
26
20
|
assert_match /add_column :kitteh_movies, :zencoder_job_status, :string/, migration
|
27
21
|
assert_match /add_column :kitteh_movies, :zencoder_job_created, :datetime/, migration
|
@@ -31,8 +25,9 @@ class ZencodableGeneratorTest < Rails::Generators::TestCase
|
|
31
25
|
|
32
26
|
test "does not create a migration for the thumbnails when --skip_thumbnails is given" do
|
33
27
|
run_generator %w(KittehMovie encoded_kitteh_vids --skip-thumbnails)
|
34
|
-
assert_migration "db/migrate/
|
35
|
-
|
28
|
+
assert_migration "db/migrate/zencodable_add_tracking_columns_and_tables.rb" do |migration|
|
29
|
+
assert_no_match /create_table "encoded_kitteh_vid_thumbnails"/, migration
|
30
|
+
end
|
36
31
|
end
|
37
32
|
|
38
33
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: zencodable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Sam Beam
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-12-
|
13
|
+
date: 2011-12-05 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -100,9 +100,7 @@ extra_rdoc_files: []
|
|
100
100
|
|
101
101
|
files:
|
102
102
|
- lib/generators/zencodable/migration_generator.rb
|
103
|
-
- lib/generators/zencodable/templates/
|
104
|
-
- lib/generators/zencodable/templates/create_association_table.rb
|
105
|
-
- lib/generators/zencodable/templates/create_association_thumbnails_table.rb
|
103
|
+
- lib/generators/zencodable/templates/zencodable_add_tracking_columns_and_tables.rb
|
106
104
|
- lib/zencodable/version.rb
|
107
105
|
- lib/zencodable.rb
|
108
106
|
- MIT-LICENSE
|
@@ -150,13 +148,12 @@ files:
|
|
150
148
|
- test/dummy/public/favicon.ico
|
151
149
|
- test/dummy/Rakefile
|
152
150
|
- test/dummy/script/rails
|
153
|
-
- test/dummy/tmp/db/migrate/
|
154
|
-
- test/dummy/tmp/db/migrate/20111202214515_create_encoded_kitteh_vids.rb
|
151
|
+
- test/dummy/tmp/db/migrate/20111205192243_zencodable_add_tracking_columns_and_tables.rb
|
155
152
|
- test/factories.rb
|
156
153
|
- test/test_helper.rb
|
157
154
|
- test/zencodable_generators_test.rb
|
158
155
|
- test/zencodable_test.rb
|
159
|
-
homepage:
|
156
|
+
homepage: https://github.com/sbeam/zencodable
|
160
157
|
licenses: []
|
161
158
|
|
162
159
|
post_install_message:
|
@@ -226,8 +223,7 @@ test_files:
|
|
226
223
|
- test/dummy/public/favicon.ico
|
227
224
|
- test/dummy/Rakefile
|
228
225
|
- test/dummy/script/rails
|
229
|
-
- test/dummy/tmp/db/migrate/
|
230
|
-
- test/dummy/tmp/db/migrate/20111202214515_create_encoded_kitteh_vids.rb
|
226
|
+
- test/dummy/tmp/db/migrate/20111205192243_zencodable_add_tracking_columns_and_tables.rb
|
231
227
|
- test/factories.rb
|
232
228
|
- test/test_helper.rb
|
233
229
|
- test/zencodable_generators_test.rb
|
@@ -1,8 +0,0 @@
|
|
1
|
-
class AddZencoderJobTrackingColumns < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
add_column :<%= name.tableize %>, :origin_url, :string
|
4
|
-
add_column :<%= name.tableize %>, :zencoder_job_status, :string
|
5
|
-
add_column :<%= name.tableize %>, :zencoder_job_created, :datetime
|
6
|
-
add_column :<%= name.tableize %>, :zencoder_job_finished, :datetime
|
7
|
-
end
|
8
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class CreateZencodableOutputFilesAssociationTable < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table "<%= association_name %>" do |t|
|
4
|
-
t.string "url"
|
5
|
-
t.string "format"
|
6
|
-
t.integer "zencoder_file_id"
|
7
|
-
t.integer "<%= name.foreign_key %>"
|
8
|
-
t.datetime "created_at"
|
9
|
-
t.integer "width"
|
10
|
-
t.integer "height"
|
11
|
-
t.integer "file_size"
|
12
|
-
t.string "error_message"
|
13
|
-
t.string "state"
|
14
|
-
t.timestamps
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
class CreateZencodableOutputFilesAssociationTable < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table "<%= association_name.singularize %>_thumbnails" do |t|
|
4
|
-
t.string "thumbnail_file_name"
|
5
|
-
t.string "thumbnail_content_type"
|
6
|
-
t.integer "thumbnail_file_size"
|
7
|
-
t.datetime "thumbnail_updated_at"
|
8
|
-
t.integer "<%= name.foreign_key %>"
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
data/test/dummy/tmp/db/migrate/20111202214515_add_zencoder_job_tracking_columns_to_kitteh_movies.rb
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
class AddZencoderJobTrackingColumns < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
add_column :kitteh_movies, :origin_url, :string
|
4
|
-
add_column :kitteh_movies, :zencoder_job_status, :string
|
5
|
-
add_column :kitteh_movies, :zencoder_job_created, :datetime
|
6
|
-
add_column :kitteh_movies, :zencoder_job_finished, :datetime
|
7
|
-
end
|
8
|
-
end
|