noosfero | Html5VideoPlugin: Bug fixes and Improvements (!1360)

Gabriel Silva gitlab at mg.gitlab.com
Mon Dec 18 12:45:09 BRST 2017


Gabriel Silva commented on a discussion on plugins/html5_video/script/video_processor_foreground.rb:

>    # Change the working dir to inside the app, so we can call `rails`
>    Dir.chdir(__dir__)
>  
> -  # Process pending files
> -  %w[ongoing waiting].each do |pool|
> -    files = Dir[File.join(POOL.path, pool, '*')]
> -    env_ids = files.map{|f| f.split('/').last }
> -    env_ids.each{|env_id| process_all_files(env_id, pool.to_sym) }
> +  Process.fork do

This will fork to process pending videos, so inotify will start watching the folder right away. It avoids the scenario where new videos were received during this initial processing step, but `video_processor` wasn't triggered since it wasn't watching the folder yet.

This thread will only be used to process the pending queue.

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1360#note_51838445
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20171218/20d002cd/attachment-0001.html>


More information about the Noosfero-dev mailing list