Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
typescript
duniter
Commits
9871890e
Unverified
Commit
9871890e
authored
7 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[fix] #1256force sync for cancelWork job
parent
700d6df3
No related branches found
No related tags found
1 merge request
!1238
Resolve "the 1.6.15 and 1.6.16 versions never starts the calculation of blocks"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/modules/prover/lib/blockProver.ts
+4
-4
4 additions, 4 deletions
app/modules/prover/lib/blockProver.ts
app/modules/prover/lib/engine.ts
+2
-2
2 additions, 2 deletions
app/modules/prover/lib/engine.ts
with
6 additions
and
6 deletions
app/modules/prover/lib/blockProver.ts
+
4
−
4
View file @
9871890e
...
@@ -67,8 +67,8 @@ export class WorkerFarm {
...
@@ -67,8 +67,8 @@ export class WorkerFarm {
/**
/**
* Eventually stops the engine PoW if one was computing
* Eventually stops the engine PoW if one was computing
*/
*/
stopPoW
()
{
async
stopPoW
()
{
this
.
stopPromise
=
querablep
(
this
.
theEngine
.
cancel
())
this
.
stopPromise
=
querablep
(
Promise
.
resolve
(
this
.
theEngine
.
cancel
())
)
return
this
.
stopPromise
;
return
this
.
stopPromise
;
}
}
...
@@ -133,10 +133,10 @@ export class BlockProver {
...
@@ -133,10 +133,10 @@ export class BlockProver {
if
(
this
.
workerFarmPromise
)
{
if
(
this
.
workerFarmPromise
)
{
let
farm
=
await
this
.
getWorker
();
let
farm
=
await
this
.
getWorker
();
if
(
farm
.
isComputing
()
&&
!
farm
.
isStopping
())
{
if
(
farm
.
isComputing
()
&&
!
farm
.
isStopping
())
{
await
farm
.
stopPoW
()
Promise
.
resolve
(
farm
.
stopPoW
()
)
}
else
{
}
else
{
// We force the stop anyway, just to be sure
// We force the stop anyway, just to be sure
await
farm
.
stopPoW
()
Promise
.
resolve
(
farm
.
stopPoW
()
)
}
}
if
(
this
.
waitResolve
)
{
if
(
this
.
waitResolve
)
{
this
.
waitResolve
();
this
.
waitResolve
();
...
...
This diff is collapsed.
Click to expand it.
app/modules/prover/lib/engine.ts
+
2
−
2
View file @
9871890e
...
@@ -33,11 +33,11 @@ export class PowEngine {
...
@@ -33,11 +33,11 @@ export class PowEngine {
}
}
async
prove
(
stuff
:
any
)
{
async
prove
(
stuff
:
any
)
{
this
.
cluster
.
cancelWork
()
Promise
.
all
([
this
.
cluster
.
cancelWork
()
])
return
await
this
.
cluster
.
proveByWorkers
(
stuff
)
return
await
this
.
cluster
.
proveByWorkers
(
stuff
)
}
}
cancel
()
{
async
cancel
()
{
return
this
.
cluster
.
cancelWork
()
return
this
.
cluster
.
cancelWork
()
}
}
...
...
This diff is collapsed.
Click to expand it.
Cédric Moreau
@c-geek
mentioned in commit
4acfe365
·
7 years ago
mentioned in commit
4acfe365
mentioned in commit 4acfe365220bf66cc8ca91dc2a69f8bd6e7ad0fc
Toggle commit list
Cédric Moreau
@c-geek
mentioned in commit
0b3f4e3f
·
7 years ago
mentioned in commit
0b3f4e3f
mentioned in commit 0b3f4e3f5aa304fdc2ec8791be6fed0454d11bf0
Toggle commit list
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment