Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Scheduling Scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xx network
Scheduling Scripts
Merge requests
!6
Fix error handling on push_point_info
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Closed
Fix error handling on push_point_info
hotfix/errors
into
master
Overview
0
Commits
2
Pipelines
0
Changes
1
Closed
Fix error handling on push_point_info
Jonah Husson
requested to merge
hotfix/errors
into
master
Nov 18, 2021
Overview
0
Commits
2
Pipelines
0
Changes
1
0
0
Merge request reports
Compare
master
version 1
02a47cdb
Nov 18, 2021
master (base)
and
latest version
latest version
662c3807
2 commits,
Nov 18, 2021
version 1
02a47cdb
1 commit,
Nov 18, 2021
1 file
+
8
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
points.py
+
8
−
4
View file @ 662c3807
Edit in single-file editor
Open in Web IDE
Show full file
@@ -139,10 +139,14 @@ def process_period(conn, substrate, keypair, point_info, start_period, end_perio
negative
.
append
([
key
,
abs
(
value
)])
# Push pointing to blockchain
if
len
(
positive
)
>
0
:
push_point_info
(
substrate
,
positive_points_func
,
keypair
,
positive
)
if
len
(
negative
)
>
0
:
push_point_info
(
substrate
,
negative_points_func
,
keypair
,
negative
)
try
:
if
len
(
positive
)
>
0
:
push_point_info
(
substrate
,
positive_points_func
,
keypair
,
positive
)
if
len
(
negative
)
>
0
:
push_point_info
(
substrate
,
negative_points_func
,
keypair
,
negative
)
except
Exception
as
e
:
log
.
error
(
f
"
Failed to push point info:
{
e
}
"
)
raise
e
with
open
(
raw_points_log
,
"
a
"
)
as
f
:
f
.
write
(
f
"
[
{
datetime
.
datetime
.
now
()
}
]
{
raw_points
}
\n
"
)
Loading