Skip to content

Commit

Permalink
longer time before action close
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Dussarps committed Aug 17, 2023
1 parent ab78cca commit 96cba98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wbce/orbits-core",
"version": "0.0.21",
"version": "0.0.22",
"description": "Flow for DevOps - a simple way to write state machine",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/core/actions/src/action-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ export class Action{

private end(){
const markAsClosed = ()=>{
//on attend dix minutes avant de mettre l'action en closed;
if((Date.now() - this.dbDoc.stateUpdatedAt.getTime()) < 10*60*1000){
this.cronActivity.nextActivity = new Date(this.dbDoc.stateUpdatedAt.getTime() + 10*60*1000);
//on attend une journée avant de mettre l'action en closed;
if((Date.now() - this.dbDoc.stateUpdatedAt.getTime()) < 24*60*60*1000){
this.cronActivity.nextActivity = new Date(this.dbDoc.stateUpdatedAt.getTime() + 24*60*60*1000);
return this.dbDoc.save().then(()=>{
return ActionState.UNKNOW;//court circuit
});
Expand Down

0 comments on commit 96cba98

Please sign in to comment.