This repository defines an asynchronous Job Scheduler written in JavaScript using Agenda for the packages of the eCLAT framework. It works like this:
- The Job Scheduler gets the next job from its MongoDB Queue containing data about the package to verify. The job gets removed from the queue.
- The Job Scheduler uses the job to download the 'package' locally from Github.
- For each downloaded package folder, it makes sure that its content respects these rules:
- Files can have the extension '.bpf.c'.
- Files can have the extension '.h'.
- Folders containing files with the extension '.py' are named 'python'.
- Folders containing files with the extension '.h' are named 'scripts'. If a file or folder doesn't check ANY of these rules, the package is not verified.
- The downloaded folder contatining files get deleted.
- The package status and data in MongoDB gets updated.
- Clone the project from github. Change "myproject" to your project name.
https://github.com/netgroup/eCLAT-agenda.git
- Download repository
- Uncompress to your desired directory
cd myproject
npm install
- Create a file named
.env
on root directory of project. - The file
.env
is already ignored, so you never commit your credentials. - Add the values to the file of your environment.
.
├── app.js
├── package.json
├── jobs
│ ├── utility.js
│ └── verify.js
└── models
├── PackageModel.js
└── ReleaseModel.js
npm run start
Every project needs improvements, Feel free to report any bugs or improvements. Pull requests are always welcome.