playov2-js-utilities 0.3.35 → 0.3.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ ScheduledTasks: require('./scheduled.tasks')
3
+ }
@@ -3,8 +3,18 @@ const Schema = mongoose.Schema;
3
3
 
4
4
  // compound index on queuId and taskId and status, so that a task is saved only once per queue
5
5
  const scheduledTaskSchema = new Schema({
6
+ httpMethod: {
7
+ type: String,
8
+ enum: ["GET", "POST", "PUT", "DELETE"],
9
+ default: "POST",
10
+ },
6
11
  taskId: { type: String, required: true },
7
12
  queueId: { type: String, required: true },
13
+ url: {
14
+ type: String,
15
+ required: true,
16
+ },
17
+ ttl: {},
8
18
  payload: {
9
19
 
10
20
  },
@@ -20,7 +30,7 @@ const scheduledTaskSchema = new Schema({
20
30
  type: String,
21
31
  enum: ['saved', 'executed', 'failed', 'cancelled'],
22
32
  default: 'saved',
23
- required: true
33
+ required: true
24
34
  },
25
35
  lastExecutionDetails: {
26
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playov2-js-utilities",
3
- "version": "0.3.35",
3
+ "version": "0.3.37",
4
4
  "description": "Private package for JS utility functions",
5
5
  "main": "index.js",
6
6
  "scripts": {