Browse Source
Feature/change execution time of asset profile data gathering (#1544)
* Change execution time
* Update changelog
pull/1552/head
Thomas Kaul
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
6 additions and
3 deletions
-
CHANGELOG.md
-
apps/api/src/services/cron.service.ts
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Changed the execution time of the asset profile data gathering to every Sunday at lunch time |
|
|
|
- Upgraded `bull` from version `4.8.5` to `4.10.2` |
|
|
|
|
|
|
|
## 1.221.0 - 2022-12-26 |
|
|
|
|
|
@ -11,6 +11,8 @@ import { TwitterBotService } from './twitter-bot/twitter-bot.service'; |
|
|
|
|
|
|
|
@Injectable() |
|
|
|
export class CronService { |
|
|
|
private static readonly EVERY_SUNDAY_AT_LUNCH_TIME = '0 12 * * 0'; |
|
|
|
|
|
|
|
public constructor( |
|
|
|
private readonly dataGatheringService: DataGatheringService, |
|
|
|
private readonly exchangeRateDataService: ExchangeRateDataService, |
|
|
@ -28,12 +30,12 @@ export class CronService { |
|
|
|
} |
|
|
|
|
|
|
|
@Cron(CronExpression.EVERY_DAY_AT_5PM) |
|
|
|
public async runEveryDayAtFivePM() { |
|
|
|
public async runEveryDayAtFivePm() { |
|
|
|
this.twitterBotService.tweetFearAndGreedIndex(); |
|
|
|
} |
|
|
|
|
|
|
|
@Cron(CronExpression.EVERY_WEEKEND) |
|
|
|
public async runEveryWeekend() { |
|
|
|
@Cron(CronService.EVERY_SUNDAY_AT_LUNCH_TIME) |
|
|
|
public async runEverySundayAtTwelvePm() { |
|
|
|
const uniqueAssets = await this.dataGatheringService.getUniqueAssets(); |
|
|
|
|
|
|
|
for (const { dataSource, symbol } of uniqueAssets) { |
|
|
|