Coder Social home page Coder Social logo

Comments (2)

justanhduc avatar justanhduc commented on May 27, 2024

Hi @tomaszklim. This should be easy. May I ask what the practical application of such delay is in your workflow?

from task-spooler.

tomaszklim avatar tomaszklim commented on May 27, 2024

Sure. I use it on https://polityka.co.pl/

Currently:

  • import new articles from RSS sources and run AI analysis
  • send notifications to various services, eg. to Bing IndexNow

What I want to do is implement multi-language sites, and use only task spooler without bigger queue mechanisms:

  • import articles, run AI analysis and all tasks that need to be synchronous
  • send notifications about articles in original language
  • enqueue notifications to other services, about translated versions (mainly to english) - but postpone them by 5-7 minutes (until translations are ready)
  • translate articles using external translation services
  • do some other english version-related stuff

My goals are:

  1. to avoid using complex workflows, where one asynchronous tasks creates another task, or even multiple tasks. I already have such workflows for importing images and it causes queue deadlocks at bigger scale.

  2. to avoid crashing the importer/AI classifier engine - that's why, after importing the article, I want to trigger series of asynchronous tasks. And the problem is: tasks are run typically from 8 to 40 instances, depending on machine load etc. details. And since some tasks are much faster than others, there is no guarantee of executing them in order.

  3. to avoid loading the AI engine and querying the database every X minutes just to trigger the notifications (I know it would be the most obvious approach).

from task-spooler.

Related Issues (20)

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.