Git Product home page Git Product logo

background-job-system's Introduction

Background Job System

https://www.codementor.io/projects/background-job-system-atx32exogo

How to use

Start the server:

go run *.go

This will start both the webserver and the jobs handler.

Web page

Open your preferred browser, reach the page localhost:8081.

In this page, you can insert a job.

What do you mean with 'job'?

A job is composed by some parameters.

  • a payload
  • a payload content-type
  • an endpoint
  • a HTTP status code
  • a due date
  • and a friendly name for your eyes

Payload

A payload is what you need to elaborate. Ideally a JSON but you could send whatever you need.

Payload Content-Type

The receiving server will be more happy if you tell it what kind of payload you are going to send to it. Defaults to application/json, change if needed.

Endpoint

The server who will receive this job and will digest. Jep, because this is a forwarding server only. The dirty work is made by endpoints.

What, don't you have an endpoint to use for testing this? I'll tell you a secret. The folder /_listener contains a dummy web server ;)

HTTP Status Code

The job handler will flag as done a job if the endpoint returns a HTTP Status Code like the one you want.

Due date

This is the time when you want your job to be sent to the endpoint. Could be any date, even in two years. The job will be stored and execute when the time comes. You can also set a date in the past and the job will run ASAP.

Name

This is for you. In the background, an UUID will be generated and used.

Jobs page

Here, with a paginator made both on server and client side, you will see everything you need to see. Select a job if you want to delete or run ASAP.

ASAP?

What do I mean with ASAP? As soon as possible, in this server means as far as the tick clocks, and this happens every minute.

Database

For this test, Sqlite3 is used.

Tests

Todo ASAP.

background-job-system's People

Contributors

brugnara avatar

Watchers

 avatar  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.