noosfero | Html5VideoPlugin: extracts conversion jobs to script (!1308)

Rodrigo Souto gitlab at mg.gitlab.com
Mon Sep 18 17:15:06 BRT 2017


Rodrigo Souto started a new discussion on plugins/html5_video/script/video_processor_foreground.rb:

> +end
> +
> +# Watches pool dir using inotifywait
> +def watch_pool
> +  IO.popen("inotifywait -r -m -e create #{POOL_DIR}") do |output|
> +    output.each do |line|
> +      path, events, filename = line.split
> +      if events.include? 'ISDIR'
> +        # A subfolder for the environment was created.
> +        env_id = filename
> +      else
> +        # A new file was added
> +        env_id = path.split('/').last
> +      end
> +
> +      # inotify may lose some events, so run for all files every time

Since `inotify` might lose some events, we might face the problem of a new video not being processed until another video is added to the pool. This could take a long time. Maybe we need to consider a complementary polling mechanism that checks the pool from time to time. What do you think?

---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1308#note_40680233
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/20170918/30432f33/attachment.html>


More information about the Noosfero-dev mailing list