GithubHelp home page GithubHelp logo

seedofjoy / darq Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 6.0 363 KB

Async task manager with Celery-like features. Fork of arq.

Home Page: http://darq.readthedocs.io

License: MIT License

Python 100.00%
asyncio python python3 redis task-manager task-runner task-scheduler

darq's People

Contributors

antonmyronyuk avatar dmvass avatar dongweiming avatar kindermax avatar pratheekrebala avatar pyup-bot avatar relrin avatar rubik avatar samuelcolvin avatar seedofjoy avatar steinitzu avatar tsutsarin avatar vanyakosmos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

darq's Issues

Gracefull shutdown

Hi
Is there a way to increase graceful_shutdown_timeout from worker config?

Pass max_jobs as CLI argument

Darq Worker can easily handle 10+ I/O-bound tasks at a time, but even 5 simultaneous CPU-bound tasks cause CPU throttling. So it is useful to have different workers with own limits for CPU-bound and I/O-bound tasks. The simplest way to reach this goal is to make ability to pass max_jobs as CLI-argument for worker.

Separate cron scheduler from worker

Separating cron scheduler from worker solves several problems:

  1. In case where we have many workers each worker trying to add the same cron jobs, which may cause duplicate task run
  2. Overhead for run_cron job on every worker
  3. It may be difficult to implement state storing for scheduler (like https://github.com/sibson/redbeat for Celery)

Queue stuck

I have a problem from time to time when queue is stuck on some message without any progress until most of the messages are invalidated by time. Restart or adding/removing clients manually don't help. Strange thing is CPU/RAM usage stays the same.
Maybe there is some kind of limitation when too many records in queue?
If anyone could help me at least how to debug a problem, because messages are not processing and logger has no new records either.
Only such records from time to time

redis_version=6.2.4 mem_usage=3.23G clients_connected=536 db_keys=6685280
recording health: Mar-31 10:04:29 j_complete=755 j_failed=1 j_retried=0 j_ongoing=0 queued=511

P.S. thanks for a great project. Have not seen anything better for asyncio

Add ability to passing args to task during creating cron job

It would be great if there was an opportunity to pass arguments to task during creating cron job

Example:

@darq.task
async def print_name(name: str = 'John'):
    print(name)


cron_jobs = (
    cron(print_name, hour=3, task_kwargs=dict(name='Lucas')),
)

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.