Code Monkey home page Code Monkey logo

background's People

Contributors

vladfaust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

background's Issues

Basic Worker functionality

Every Worker spawns fibers, which grab Redis clients from a pool. A user can declare the maximum amount of fibers (i.e. Redis clients) per Worker.

  • Processing jobs
  • Having fibers with Redis pool

Worker#stop

Currently calling redis.close doesn't break redis.blpop.

Update the license

Apache 2.0 has a nice point regarding to trademark usage:

6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

Also Mozilla Public License 2.0:

This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).

Should combine these two to disallow logos and naming usage.

Self-hosted web UI

Basic version with functionality similar to the CLI. Likely to be a separate repository.

Basic Watcher functionality

Watcher watches for scheduled jobs and moves them to "ready" queue when the time is right. It also watches for orphan jobs and marks them as failed.

  • Watching for scheduled jobs
  • Watching for orphan jobs

CLI `reenqueue` command

To reenqueue a failed attempt:

$ ./cli reenqueue 0df9beab-ac81-4d4b-a5a9-a34fb3346705
OK

Also with additional options like --in and --at.

CLI `failed` command

A command to list all failed attempts.

$ ./cli failed -q default
default
time   attempt        reason
<time> <attempt UUID> <error>

Logging abstraction

Presumably a Job will have a logger instance variable:

# :nodoc:
setter logger : Logger
protected getter logger : Logger

This logger should be then set by a Worker on every execution:

worker = Onyx::Background::Worker.new(job_logger_proc: ->{ Logger.new(STDOUT) })

# ...

instance.logger = job_logger_proc.call
instance.perform

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.