Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
guru
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
guru
Commits
6dceeba7
Commit
6dceeba7
authored
6 years ago
by
Clint Mourlevat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing issue for the timer
parent
7e453c2f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
TickerService.cs
Services/TickerService.cs
+1
-1
No files found.
Services/TickerService.cs
View file @
6dceeba7
...
@@ -30,12 +30,12 @@ namespace Stratis.Guru.Services
...
@@ -30,12 +30,12 @@ namespace Stratis.Guru.Services
updateTimer
.
Enabled
=
true
;
updateTimer
.
Enabled
=
true
;
updateTimer
.
Elapsed
+=
async
(
sender
,
args
)
=>
updateTimer
.
Elapsed
+=
async
(
sender
,
args
)
=>
{
{
updateTimer
.
Interval
=
TimeSpan
.
FromMinutes
(
10
).
TotalMilliseconds
;
var
coinmarketCapApiClient
=
new
RestClient
(
"https://api.coinmarketcap.com/v2/ticker/1343/"
);
var
coinmarketCapApiClient
=
new
RestClient
(
"https://api.coinmarketcap.com/v2/ticker/1343/"
);
var
coinmarketCapApiRequest
=
new
RestRequest
(
Method
.
GET
);
var
coinmarketCapApiRequest
=
new
RestRequest
(
Method
.
GET
);
var
coinmarketcapApi
=
coinmarketCapApiClient
.
Execute
(
coinmarketCapApiRequest
);
var
coinmarketcapApi
=
coinmarketCapApiClient
.
Execute
(
coinmarketCapApiRequest
);
_memoryCache
.
Set
(
"Coinmarketcap"
,
coinmarketcapApi
.
Content
);
_memoryCache
.
Set
(
"Coinmarketcap"
,
coinmarketcapApi
.
Content
);
Console
.
WriteLine
(
DateTime
.
Now
+
" - Ticker Updated"
);
Console
.
WriteLine
(
DateTime
.
Now
+
" - Ticker Updated"
);
updateTimer
.
Interval
=
TimeSpan
.
FromMinutes
(
10
).
TotalMilliseconds
;
await
_hubContext
.
Clients
.
All
.
SendAsync
(
"UpdateTicker"
,
cancellationToken
);
await
_hubContext
.
Clients
.
All
.
SendAsync
(
"UpdateTicker"
,
cancellationToken
);
};
};
updateTimer
.
Start
();
updateTimer
.
Start
();
...
...
This diff is collapsed.
Click to expand it.
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