mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
be0fc0b324
- Updated Readme - Nicer overview of a playbook
28 lines
438 B
JavaScript
28 lines
438 B
JavaScript
var mongoose = require('mongoose')
|
|
var ObjectId = mongoose.Schema.ObjectId;
|
|
|
|
var schema = mongoose.Schema({
|
|
created: {
|
|
type: Date,
|
|
default: Date.now
|
|
},
|
|
job: {
|
|
type: ObjectId,
|
|
ref: 'Job'
|
|
},
|
|
playbook: {
|
|
type: ObjectId,
|
|
ref: 'Playbook'
|
|
},
|
|
output: String,
|
|
status: {
|
|
type: String,
|
|
enum: ['Completed', 'Failed', 'Running', 'Queued']
|
|
}
|
|
});
|
|
|
|
schema.index({
|
|
status: 1
|
|
});
|
|
|
|
module.exports = mongoose.model('Task', schema); |