-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added GetDeployInformationUseCase
- Loading branch information
Showing
4 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
lib/application/usecases/server/GetDeployInformationUseCase.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* @license | ||
* Copyright CERN and copyright holders of ALICE O2. This software is | ||
* distributed under the terms of the GNU General Public License v3 (GPL | ||
* Version 3), copied verbatim in the file "COPYING". | ||
* | ||
* See http://alice-o2.web.cern.ch/license for full licensing information. | ||
* | ||
* In applying this license CERN does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an Intergovernmental Organization | ||
* or submit itself to any jurisdiction. | ||
*/ | ||
|
||
const { IUseCase } = require('../../interfaces'); | ||
|
||
const START_TIME = new Date(); | ||
|
||
/** | ||
* GetDeployInformationUseCase | ||
*/ | ||
class GetDeployInformationUseCase extends IUseCase { | ||
/** | ||
* Executes this use case. | ||
* | ||
* @returns {Promise} Promise object represents the result of this use case. | ||
*/ | ||
async execute() { | ||
return Promise.resolve({ | ||
age: Math.round((new Date() - START_TIME) / 1000), | ||
start: START_TIME.getTime(), | ||
}); | ||
} | ||
} | ||
|
||
module.exports = GetDeployInformationUseCase; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters