Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
locklost
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Jameson Rollins
locklost
Commits
e074d18a
Commit
e074d18a
authored
5 years ago
by
Jameson Rollins
Browse files
Options
Downloads
Patches
Plain Diff
search: don't skip event callback if event exists
parent
b3801db0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
locklost/event.py
+1
-0
1 addition, 0 deletions
locklost/event.py
locklost/search.py
+1
-2
1 addition, 2 deletions
locklost/search.py
with
2 additions
and
2 deletions
locklost/event.py
+
1
−
0
View file @
e074d18a
...
@@ -147,6 +147,7 @@ class LocklossEvent(object):
...
@@ -147,6 +147,7 @@ class LocklossEvent(object):
if
transition_index
:
if
transition_index
:
with
open
(
event
.
gen_path
(
'
transition_index
'
),
'
w
'
)
as
f
:
with
open
(
event
.
gen_path
(
'
transition_index
'
),
'
w
'
)
as
f
:
f
.
write
(
'
{:.0f} {:.0f}
\n
'
.
format
(
*
transition_index
))
f
.
write
(
'
{:.0f} {:.0f}
\n
'
.
format
(
*
transition_index
))
logging
.
info
(
"
event created: {}
"
.
format
(
event
.
path
))
return
event
return
event
def
_scrub
(
self
,
archive
=
True
):
def
_scrub
(
self
,
archive
=
True
):
...
...
This diff is collapsed.
Click to expand it.
locklost/search.py
+
1
−
2
View file @
e074d18a
...
@@ -40,8 +40,7 @@ def search_buf(buf, previous=None, event_callback=None):
...
@@ -40,8 +40,7 @@ def search_buf(buf, previous=None, event_callback=None):
event
=
LocklossEvent
.
create
(
time
,
trans
)
event
=
LocklossEvent
.
create
(
time
,
trans
)
except
OSError
as
e
:
except
OSError
as
e
:
logging
.
info
(
e
)
logging
.
info
(
e
)
continue
event
=
LocklossEvent
(
time
)
logging
.
info
(
"
wrote event: {}
"
.
format
(
event
.
path
))
if
event_callback
:
if
event_callback
:
logging
.
info
(
"
executing event callback: {}({})
"
.
format
(
logging
.
info
(
"
executing event callback: {}({})
"
.
format
(
event_callback
.
__name__
,
event
.
id
))
event_callback
.
__name__
,
event
.
id
))
...
...
This diff is collapsed.
Click to expand it.
Jameson Rollins
@jameson.rollins
mentioned in issue
#150 (closed)
·
5 years ago
mentioned in issue
#150 (closed)
mentioned in issue #150
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