Operations Module moved to old repos

This commit is contained in:
Luis Fernando Molina committed 2020-11-20 19:46:12 +01:00
1 parent 765659d4a2
commit 9e00cd2468
88 files changed
-84

No files matched your search

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-33
View File
@@ -1,33 +0,0 @@
{
"apiVersion": "batch/v1",
"kind": "Job",
"metadata": {
"labels": {
"app": "clone-executor"
},
"name": "clone-executor"
},
"spec": {
"template": {
"spec": {
"restartPolicy": "OnFailure",
"ttlSecondsAfterFinished": 1,
"containers": [
{
"name": "clone-executor",
"image": "superalgos/clone-executor:1.0.12",
"command": ["node", "Run.js"],
"env": [
]
}
],
"hostNetwork": true
},
"metadata": {
"labels": {
"app": "clone-executor"
}
}
}
}
}
-42
View File
@@ -1,42 +0,0 @@
import { createLogger, format, transports } from 'winston'
const { combine, timestamp, simple } = format
import { inspect } from 'util'
const options = {
file: {
level: 'info',
filename: '../logs/app.log',
handleExceptions: true,
json: true,
maxsize: 5242880, // 5MB
maxFiles: 5,
colorize: false,
timestamp: true
},
console: {
level: 'debug',
handleExceptions: true,
json: false,
colorize: true,
timestamp: true
}
}
const logger = createLogger({
level: 'info',
format: format.combine(
format.colorize(),
format.splat(),
format.timestamp({ format: 'YY/MM/DD HH:mm' }),
format.printf(
info => `${info.timestamp} - ${info.level}: ${JSON.parse(JSON.stringify(inspect(info.message)))}`
)
),
transports: [
new transports.File(options.file),
new transports.Console(options.console)
],
exitOnError: false // do not exit on handled exceptions
})
export default logger
-9
View File
@@ -1,9 +0,0 @@
export function toPlatformDatetime (epoch) {
const platformDate = new Date(0)
platformDate.setUTCSeconds(epoch)
return platformDate.toISOString()
}
export function isDefined (d) {
return d !== null && typeof d !== 'undefined'
}