GithubHelp home page GithubHelp logo

andribas404 / twin_queue Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 33 KB

Прототип веб-сервиса по организации очереди задач.

License: MIT License

Python 57.51% Dockerfile 3.93% Shell 1.99% Jupyter Notebook 36.58%
django celery drf

twin_queue's Introduction

twin_queue

Прототип веб-сервиса по организации очереди задач.

Требования к прототипу:

1. Реализовать вызов API, при обращении к которому создается
задача, которая добавляется в очередь, и пользователю возвращается
номер задачи.
    Второй вызов API возвращает статус задачи в формате json
{'status:'', 'create_time":'', 'start_time':'', 'time_to_execute':''}.
Статусы:
    - In Queue     -- задача ждёт своей очереди на выполнение;
    - Run          -- произошел запуск задачи;
    - Completed    -- задача выполнена.
3. Выполнение задачи представляет собой простой python-код (test.py):
"
import time
import random
time.sleep(random.randint(0,10))
"

Обратите внимание:
!!! можно создавать множество задач, но выполняться одновременно
должно не более 2 (двух).
!!! результаты записать в локальную БД с полями: id (первичный
ключ, номер поставленной задачи), create_time (время создания
задачи), start_time (время старта задачи), exec_time (время
выполнения задачи)

Требования к окружению, фреймворкам и используемым программам:
- Python 3.x;
- БД PostgreSQL, MySQL,  Redis etc;
- Django, Flask, aiohttp, etx.

twin_queue's People

Contributors

andribas404 avatar dependabot[bot] avatar

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.