WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

in-memory database: refactor needed #424

@mdonadoni

Description

@mdonadoni

Job controller is keeping an "in-memory" copy of the Job table of the database.

First of all, we should investigate why this is needed, maybe for performance reason?

If it's not needed, should we drop the in-memory database and only use PostgreSQL?

If the in-memory database needs to be kept around, then:

  • use a proper class and not a dict
  • all the access to the in-memory database are done through methods of the class, no direct access to the job objects
  • use primitives (locks, condition variables, ...) to make sure the database is thread-safe
  • the class keeps the in-memory and the PostgreSQL database in sync
  • make the Job object a proper class and not a dict
  • if possible, avoid keeping the database as a global variable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions