Giter Club home page Giter Club logo

extractor's Introduction

SnapShot Extractor

This is a tool for Evercam specifically build to extract images for a camera from SeaweedFS server.

Core Dependencies

  1. Dropbox (For uploading image)
  2. Httpoison (Http requests)
  3. Mailgun (Email sending)
  4. Quantum (Cron Job)

How it works

It takes the most recent created SnapshotExtractor whom status is 0 at the moment.

  1. It will update its status to 1 and send en email to the owner that image extraction has been started with Extraction information.
  2. It will fetch total days and recording dates from SnapshotExtractor's schedule. e.g {"Monday":["12:30-13:0"],"Tuesday":[],"Wednesday":["4:0-4:30"],"Thursday":[],"Friday":["8:30-9:0"],"Saturday":[],"Sunday":["19:30-20:0"]}
  3. From a specific starting to ending date, for each day and according to schedule, It will fetch all images and save them to DropBox.
  4. No crash on any timeout/Any other reason from seaweedFS Servers or dropbox.
  5. After complition it will send an email again with total image gained / total image expected to the user how initiated requests.

extractor's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

extractor's Issues

More information

Can we specify the hours on which there was no image??

missing hours

Propose Logo

Hi @ijunaid8989 ,, I'm a graphic designer and an open source enthusiast. I'd like to contribute to your project by proposing a logo design and I've designed logos for your project. If you have an idea please share with me, it would be better for me. Best Regard.
snapshot extractor

Ansible

Can we use ansible for any cause?

Strange issue might be from seaweedFS

2017-03-09T15:06:17.384540+00:00 app[web.1]: 15:06:17.383 [error] Task #PID<0.2611.0> started from Quantum terminating
2017-03-09T15:06:17.384543+00:00 app[web.1]: ** (CaseClauseError) no case clause matching: {:ok, %HTTPoison.Response{body: "{\"error\":\"Get http://88.99.48.9:8080/32788,c2cff08bd3729b47: dial tcp 88.99.48.9:8080: getsockopt: connection refused\"}", headers: [{"Content-Type", "application/json"}, {"Date", "Thu, 09 Mar 2017 15:06:17 GMT"}, {"Content-Length", "119"}], status_code: 500}}
2017-03-09T15:06:17.384544+00:00 app[web.1]:     (extractor) lib/snapshot/snap_extractor.ex:138: Extractor.SnapExtractor.do_loop/6
2017-03-09T15:06:17.384545+00:00 app[web.1]:     (elixir) lib/enum.ex:651: Enum."-each/2-lists^foreach/1-0-"/2
2017-03-09T15:06:17.384546+00:00 app[web.1]:     (elixir) lib/enum.ex:651: Enum.each/2
2017-03-09T15:06:17.384547+00:00 app[web.1]:     (extractor) lib/snapshot/snap_extractor.ex:59: anonymous fn/8 in Extractor.SnapExtractor.extract/1
2017-03-09T15:06:17.384548+00:00 app[web.1]:     (elixir) lib/enum.ex:1628: anonymous fn/3 in Enum.reduce/3
2017-03-09T15:06:17.384549+00:00 app[web.1]:     (elixir) lib/range.ex:92: Enumerable.Range.reduce/5
2017-03-09T15:06:17.384549+00:00 app[web.1]:     (elixir) lib/enum.ex:1627: Enum.reduce/3
2017-03-09T15:06:17.384550+00:00 app[web.1]:     (extractor) lib/snapshot/snap_extractor.ex:53: Extractor.SnapExtractor.extract/1
2017-03-09T15:06:17.384551+00:00 app[web.1]: Function: &Quantum.Executor.execute/2
2017-03-09T15:06:17.384554+00:00 app[web.1]:     Args: [{"*/2 * * * *", {"Extractor.StartExtractor", "start"}, [], :utc}, %{d: {2017, 3, 9}, h: 14, jobs: [snapshot_extraction: %Quantum.Job{args: [], name: :snapshot_extraction, nodes: [:nonode@nohost], overlap: false, pid: #PID<0.2610.0>, schedule: "*/2 * * * *", state: :active, task: {"Extractor.StartExtractor", "start"}, timezone: :

Optimise How you get the list of snapshots

  • Probably by first requesting the entire list and second generating the requests.
  • calculate what the predicted # snapshots should be, so we know the We got XX of YY .
  • Make schedule component horizontal (Reasons there is no option available for this but we can create something for our own need which is called customView https://fullcalendar.io/docs/views/Custom_Views/) UPDATE
  • Schedule component can default to M-F 8:00-17:30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.