Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gotimeout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dustin L. Howett
gotimeout
Commits
2966bb2b
Commit
2966bb2b
authored
Aug 09, 2013
by
Dustin L. Howett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[expirator] Run the expirator automatically when it's created. Make Run private.
parent
5f9867f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
expirator.go
expirator.go
+4
-2
No files found.
expirator.go
View file @
2966bb2b
...
...
@@ -34,11 +34,13 @@ type ExpirableStore interface {
}
func
NewExpirator
(
path
string
,
store
ExpirableStore
)
*
Expirator
{
return
&
Expirator
{
e
:=
&
Expirator
{
store
:
store
,
dataPath
:
path
,
expirationChannel
:
make
(
chan
*
expirationHandle
,
1000
),
}
go
e
.
run
()
return
e
}
func
(
e
*
Expirator
)
canSave
()
bool
{
...
...
@@ -123,7 +125,7 @@ func (e *Expirator) cancelExpirationHandle(ex *expirationHandle) {
glog
.
Info
(
"Execution order for "
,
ex
.
ID
,
" belayed."
)
}
func
(
e
*
Expirator
)
R
un
()
{
func
(
e
*
Expirator
)
r
un
()
{
go
e
.
loadExpirations
()
glog
.
Info
(
"Launching Expirator."
)
var
flushTickerChan
,
urgentFlushTickerChan
<-
chan
time
.
Time
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment