vladfaust / background Goto Github PK
View Code? Open in Web Editor NEWFast background job processing
Home Page: https://api.onyxframework.org/background
License: BSD 3-Clause "New" or "Revised" License
Fast background job processing
Home Page: https://api.onyxframework.org/background
License: BSD 3-Clause "New" or "Revised" License
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.
Currently calling redis.close
doesn't break redis.blpop
.
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.
Basic version with functionality similar to the CLI. Likely to be a separate repository.
Manager allows to enqueue and dequeue jobs.
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.
To reenqueue a failed attempt:
$ ./cli reenqueue 0df9beab-ac81-4d4b-a5a9-a34fb3346705
OK
Also with additional options like --in
and --at
.
A command to list all failed attempts.
$ ./cli failed -q default
default
time attempt reason
<time> <attempt UUID> <error>
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
Re-uses the same Redis Job instance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.