Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Domain Data Management Services
Seismic
Seismic DMS Suite
seismic-dms-service
Commits
c802dabf
Commit
c802dabf
authored
Aug 09, 2022
by
Yan Sushchynski (EPAM)
Browse files
fix: Anthos logger and Minio
parent
365dea4f
Pipeline
#128495
failed with stages
in 12 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/sdms/src/cloud/providers/anthos/logger.ts
View file @
c802dabf
...
...
@@ -13,10 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import
{
getLogger
}
from
'
log4js
'
;
import
{
AbstractLogger
,
LoggerFactory
}
from
'
../../logger
'
;
import
{
AnthosConfig
}
from
'
./config
'
;
// fetch logger and export
@
LoggerFactory
.
register
(
'
anthos
'
)
...
...
@@ -24,16 +21,17 @@ export class AnthosLogger extends AbstractLogger {
public
info
(
data
:
any
):
void
{
// tslint:disable-next-line:no-logger
logger
.
info
(
data
);
console
.
info
(
data
);
}
public
debug
(
data
:
any
):
void
{
// tslint:disable-next-line:no-logger
logger
.
debug
(
data
);
console
.
debug
(
data
);
}
public
error
(
data
:
any
):
void
{
logger
.
error
(
data
);
// tslint:disable-next-line:no-logger
console
.
error
(
data
);
}
// [TODO] this method should report a metrics using CSP SDK
...
...
@@ -41,9 +39,3 @@ export class AnthosLogger extends AbstractLogger {
return
;
}
}
export
const
logger
=
getLogger
();
export
function
config
()
{
logger
.
level
=
AnthosConfig
.
LOGGER_LEVEL
;
}
app/sdms/src/cloud/providers/anthos/storage.ts
View file @
c802dabf
...
...
@@ -185,7 +185,7 @@ export class MinIOStorage extends AbstractStorage {
}
);
const
listedObjects
=
await
this
.
s3
.
send
(
listCommand
);
if
(
listedObjects
.
Contents
.
length
===
0
)
if
(
typeof
(
listedObjects
.
Contents
)
===
'
undefined
'
||
listedObjects
.
Contents
.
length
===
0
)
return
;
const
deleteParams
=
{
...
...
@@ -263,7 +263,8 @@ export class MinIOStorage extends AbstractStorage {
const
listCommand
=
new
ListObjectsCommand
(
params
);
const
listedObjects
=
await
this
.
s3
.
send
(
listCommand
);
if
(
listedObjects
.
Contents
.
length
===
0
)
return
;
if
(
typeof
(
listedObjects
.
Contents
)
===
'
undefined
'
||
listedObjects
.
Contents
.
length
===
0
)
return
;
const
deleteParams
=
{
Bucket
:
this
.
minioBucket
,
...
...
@@ -342,7 +343,7 @@ export class MinIOStorage extends AbstractStorage {
try
{
const
listCommand
=
new
ListObjectsCommand
(
params
);
const
listedObjects
=
await
this
.
s3
.
send
(
listCommand
);
if
(
listedObjects
.
Contents
.
length
===
0
)
if
(
typeof
(
listedObjects
.
Contents
)
===
'
undefined
'
||
listedObjects
.
Contents
.
length
===
0
)
return
false
;
return
true
;
}
catch
(
err
)
{
...
...
David Diederich
@divido
mentioned in commit
654baa86
·
Aug 17, 2022
mentioned in commit
654baa86
mentioned in commit 654baa86444bb724f6dd7882e4e66438971004ba
Toggle commit list
Chad Leong
@chad
mentioned in merge request
!489 (merged)
·
Aug 17, 2022
mentioned in merge request
!489 (merged)
mentioned in merge request !489
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment