Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (59)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (4502)

  • Rails 4.2.8 Using Paperclip With Resque

    27 mars 2017, par AntonioMarquis

    My application uploads training videos to a S3 bucket. I need the transcoding videos to be processed in the background so they don’t tie up the application. I want to use Resque on my dev machine and Heroku. But my jobs continue to fail.

    Model

    has_attached_file :video

    process_in_background :video

    Gems

    gem 'aws-sdk', '< 2.0'
    gem 'paperclip'
    gem 'paperclip-av-transcoder'
    gem "paperclip-ffmpeg"
    gem "ffmpeg"
    gem 'daemons'
    gem 'delayed_paperclip'
    gem 'nokogiri'#, '~> 1.5.9'
    gem 'rmagick'
    gem 'resque', "~> 1.22.0"

    Output from Failed Jobs

    Class ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper

    Arguments {"job_class"=>"DelayedPaperclip::Jobs::ActiveJob", "job_id"=>"111e4f9d-942d-4613-b3cb-0e884581249f", "queue_name"=>"paperclip", "arguments"=>["Video", 30, "source"], "locale"=>"en"}

    Exception NoMethodError

    Error undefined method `call' for "result == false":String

    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:165:in `block in halting'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in `block in call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in `each'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:504:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_source_post_process_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/callbacks.rb:26:in `run_paperclip_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/attachment.rb:419:in `block in post_process'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_post_process_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/callbacks.rb:26:in `run_paperclip_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/attachment.rb:418:in `post_process'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/attachment.rb:112:in `assign'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/paperclip-3.5.4/lib/paperclip/attachment.rb:322:in `reprocess!'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/delayed_paperclip-2.10.0/lib/delayed_paperclip/attachment.rb:68:in `process_delayed!'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/delayed_paperclip-2.10.0/lib/delayed_paperclip.rb:36:in `process_job'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/delayed_paperclip-2.10.0/lib/delayed_paperclip/jobs/active_job.rb:10:in `perform'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/execution.rb:32:in `block in perform_now'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:343:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/i18n-0.8.1/lib/i18n.rb:257:in `with_locale'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/translation.rb:7:in `block (2 levels) in '
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:441:in `instance_exec'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:441:in `block in make_lambda'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:342:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:342:in `block in simple'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `block in around'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:343:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:23:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:23:in `block (4 levels) in '
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:22:in `block (3 levels) in '
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:43:in `block in tag_logger'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `block in tagged'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:26:in `tagged'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `tagged'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:43:in `tag_logger'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/logging.rb:19:in `block (2 levels) in '
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:441:in `instance_exec'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:441:in `block in make_lambda'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:342:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:342:in `block in simple'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:497:in `block in around'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_perform_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551@global/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/execution.rb:31:in `perform_now'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/execution.rb:21:in `execute'
    /Users/antoniomarquis/.rvm/gems/ruby-1.9.3-p551/gems/activejob-4.2.8/lib/active_job/queue_adapters/resque_adapter.rb:46:in `perform'
    Powered by Resque v1.22.0
    Connected to Redis namespace resque on redis://127.0.0.1:6379/0
  • Encoding error with Sidekiq

    14 mars 2017, par DavidK

    Im following this tutorial https://www.pubnub.com/blog/2015-12-08-building-video-sharing-app-server-messaging-ruby/ on Building a Video Sharing App. Its a bit outdated and Ive already had to fix a view issues to get this far but Im pretty lost now with this latest issue. I believe its something to do with sidekiq. When I try uploading a video it seems to work and shows up on the database, but I get a "Video is still being encoded." message.

    This is the log :

    2017-03-13T22:00:14.729Z 11109 TID-ova30dq94 WebmVideoEncoder JID-540aa74110e63e334a712719 INFO: fail: 0.122 sec
    2017-03-13T22:00:14.730Z 11109 TID-ova30dq94 WARN: {"context":"Job raised exception","job":{"class":"WebmVideoEncoder","args":[3],"retry":true,"queue":"default","jid":"540aa74110e63e334a712719","created_at":1489441065.533313,"enqueued_at":1489442414.60714,"error_message":"exception class/object expected","error_class":"TypeError","failed_at":1489441065.541595,"retry_count":6,"retried_at":1489442414.7293491},"jobstr":"{\"class\":\"WebmVideoEncoder\",\"args\":[3],\"retry\":true,\"queue\":\"default\",\"jid\":\"540aa74110e63e334a712719\",\"created_at\":1489441065.533313,\"enqueued_at\":1489442414.60714,\"error_message\":\"exception class/object expected\",\"error_class\":\"TypeError\",\"failed_at\":1489441065.541595,\"retry_count\":5,\"retried_at\":1489441667.7081149}"}
    2017-03-13T22:00:14.730Z 11109 TID-ova30dq94 WARN: TypeError: exception class/object expected
    2017-03-13T22:00:14.730Z 11109 TID-ova30dq94 WARN: /Users/David/rubyProjects/videouploader/videouploader/app/workers/webm_video_encoder.rb:14:in `raise'
    /Users/David/rubyProjects/videouploader/videouploader/app/workers/webm_video_encoder.rb:14:in `perform'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:158:in `execute_job'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:138:in `block (4 levels) in process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq.rb:36:in `block in '
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:133:in `block (3 levels) in process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/bundler/gems/sidetiq-7bec4084165f/lib/sidetiq/middleware/history.rb:8:in `call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/logging.rb:32:in `with_context'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/logging.rb:7:in `call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:133:in `invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:132:in `block (2 levels) in process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:174:in `stats'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:131:in `block in process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/rails.rb:106:in `block in call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/execution_wrapper.rb:85:in `wrap'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/reloader.rb:68:in `block in wrap'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/execution_wrapper.rb:85:in `wrap'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/reloader.rb:67:in `wrap'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/rails.rb:105:in `call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:126:in `process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:82:in `process_one'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:70:in `run'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/util.rb:17:in `watchdog'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/util.rb:26:in `block in safe_thread'
    2017-03-13T22:00:50.877Z 11109 TID-ova3gyd4k ThumbnailCutter JID-d0c693e39e06c2cccdec7d33 INFO: start
    sh: -c: line 0: syntax error near unexpected token `('
    sh: -c: line 0: `ffmpeg -i /Users/David/rubyProjects/videouploader/videouploader/public/system/videos/video_files/000/000/002/original/Heart_of_Gold_-_Neil_Young_cover_with_harmonica.1_(1).mp4 -ss 00:00:01.000 -vframes 1 /tmp/1489442450881632.png'
    2017-03-13T22:00:50.902Z 11109 TID-ova3gyd4k ThumbnailCutter JID-d0c693e39e06c2cccdec7d33 INFO: fail: 0.025 sec
    2017-03-13T22:00:50.903Z 11109 TID-ova3gyd4k WARN: {"context":"Job raised exception","job":{"class":"ThumbnailCutter","args":[2],"retry":true,"queue":"default","jid":"d0c693e39e06c2cccdec7d33","created_at":1489437193.246615,"enqueued_at":1489442450.8759801,"error_message":"exception class/object expected","error_class":"TypeError","failed_at":1489437193.254677,"retry_count":7,"retried_at":1489442450.901133},"jobstr":"{\"class\":\"ThumbnailCutter\",\"args\":[2],\"retry\":true,\"queue\":\"default\",\"jid\":\"d0c693e39e06c2cccdec7d33\",\"created_at\":1489437193.246615,\"enqueued_at\":1489442450.8759801,\"error_message\":\"exception class/object expected\",\"error_class\":\"TypeError\",\"failed_at\":1489437193.254677,\"retry_count\":6,\"retried_at\":1489441044.6660218}"}
    2017-03-13T22:00:50.903Z 11109 TID-ova3gyd4k WARN: TypeError: exception class/object expected
    2017-03-13T22:00:50.903Z 11109 TID-ova3gyd4k WARN: /Users/David/rubyProjects/videouploader/videouploader/app/workers/thumbnail_cutter.rb:13:in `raise'
    /Users/David/rubyProjects/videouploader/videouploader/app/workers/thumbnail_cutter.rb:13:in `perform'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:158:in `execute_job'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:138:in `block (4 levels) in process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq.rb:36:in `block in '
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:133:in `block (3 levels) in process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/bundler/gems/sidetiq-7bec4084165f/lib/sidetiq/middleware/history.rb:8:in `call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/logging.rb:32:in `with_context'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/server/logging.rb:7:in `call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:130:in `block in invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/middleware/chain.rb:133:in `invoke'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:132:in `block (2 levels) in process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:174:in `stats'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:131:in `block in process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/rails.rb:106:in `block in call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/execution_wrapper.rb:85:in `wrap'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/reloader.rb:68:in `block in wrap'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/execution_wrapper.rb:85:in `wrap'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/activesupport-5.0.2/lib/active_support/reloader.rb:67:in `wrap'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/rails.rb:105:in `call'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:126:in `process'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:82:in `process_one'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/processor.rb:70:in `run'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/util.rb:17:in `watchdog'
    /Users/David/.rvm/gems/ruby-2.3.0/gems/sidekiq-4.2.9/lib/sidekiq/util.rb:26:in `block in safe_thread'

    thumbnail_cutter.rb

    class ThumbnailCutter
     include Sidekiq::Worker

     def perform(video_id)
       video = Video.find(video_id)
       output = "/tmp/#{Time.now.getutc.to_f.to_s.delete('.')}.png"
       _command = `ffmpeg -i #{video.video_file.path} -ss 00:00:01.000 -vframes 1 #{output}`
       if $?.to_i == 0
         video.thumbnail = File.open(output, 'r')
         video.save
         FileUtils.rm(output)
       else
         raise $?
       end
     end
    end
  • Révision 23469 : Ticket #3897 : Dans la fonction de traduction, pouvoir récupérer la langue du tex...

    8 mars 2017, par marcimat@rezo.net

    Effectivement, 1) l’information n’était pas conservée en mémoire, et 2) elle pouvait être fausse lorsqu’un module de langue n’existe pas dans la langue demandée.
    On réécrit et sauvegarde dans un objet SPIP_Traductions_Description chaque traduction qui a été calculée, avec sa langue, son module, etc.
    Un nouveau paramètre à inc_traduire_dist() permet de récupérer cette description plutôt que la chaîne directement traduite.

    On utilise cette nouvelle option dans extraire_idiome(), ce qui permet de connaître la langue de la traduction et de placer (ou pas) le ``
    autour de la traduction récupérée.